Developers

Navigation

How to create navigation viewparts

Navigation

Adding and configuring a navigation viewpart

$see->addViewPart('viewpartname');
$see->configureViewPart( 'viewpartname', 'controller', 'SeeCMSPage' );
$see->configureViewPart( 'viewpartname', 'controllerMethod', 'navigation' );
$see->configureViewPart( 'viewpartname', 'controllerPassin', array( 'startAtParent' => 0, 'startAtLevel' => 0, 'levelsToGenerate' => 1, 'html' => 1) );

These configuration settings are used for a navigation viewpart.

There are four main parameters that need to be added to configure the view part for you navigation.

'startAtParent'

Setting this parameter to '0' will generate and display navigation for all of the top level pages of the website. To generate navigation for a specific page, change this number to the number id of the page you want the navigation to start.

'startAtLevel'

This determines which level your navigation will generate from. For example, 0 generates from the top level pages, 1 will start from a sub page of a top level page, etc.

'levelsToGenerate'

This determines how many levels of navigation to produce so to show only top level pages you'd set this to 1


Optional settings

'mode' => 'allpages'

This will output the full navigation excluding any pages ticked hide form navigation.

'mode' => 'sitemap'

This will output the full navigation excluding any pages ticked hide from sitemap.