Menu::getRootline()
\nn\t3::Menu()->getRootline($rootPid = NULL, $config = []);
Returns a simple array with the rootline to the current page. Can be used for BreadCrumb navigations
// get rootline for current page ID (pid)
\nn\t3::Menu()->getRootline();
// get rootline for page 123
\nn\t3::Menu()->getRootline( 123 );
Copied!
There is also a ViewHelper for this:
{nnt3:menu.rootline(pageUid:123, ...)}
Copied!
@param int $rootPid
@param array $config
@return mixed
Source Code
public function getRootline( $rootPid = null, $config = [] )
{
$config['type'] = 'rootline';
return $this->get( $rootPid, $config )['children'];
}
Copied!