public function ancestor($lookup = null)
    {
        /** @var Pages $pages */
        $pages = Grav::instance()['pages'];

        return $pages->ancestor($this->route, $lookup);
    }
public function ancestor($lookup = null)
    {
        /** @var Pages $pages */
        $pages = Grav::instance()['pages'];

        return $pages->ancestor($this->route, $lookup);
    }
public function ancestor ( $ lookup = null ) { /** @var Pages $pages */ $ pages = Grav :: instance ( ) [ 'pages' ] ; return $ pages -> ancestor ( $ this -> route , $ lookup ) ; }
Helper method to return an ancestor page.

@param bool $lookup Name of the parent folder

@return PageInterface page you were looking for if it exists
Helper method to return an ancestor page .