SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class NavigationMenu

Renders a menu for the page node structure

If you would like to edit this, it would be much wiser to sub-class it
and override the various methods

Variables

NameVisibilityDescription
$close_html (static)
HTML to be returned after the last navigation item
$dropdown_view_name (static)
The view name to use for rendering sub-menu dropdowns.
Note that if a sub-class overrides the {@see navigation::sub_menu} method
then this parameter may get ignored.
$open_html (static)
HTML to be returned prior to the first navigation item

Functions

NameVisibilityDescription
determineClassespublic (static)Determine the classes for the LI for a navigation item
homeprotected (static)Return HTML for the home page nav item
renderpublic (static)Return HTML for a mega menu.
subMenuprotected (static)Return HTML for a drop-down sub menu

public determineClasses

array NavigationMenu::determineClasses ( Treenode $node , int $depth , int $index , Treenode $selected_node , array $selected_ancestors , bool $has_children );

Determine the classes for the LI for a navigation item

protected home

string NavigationMenu::home ( );

Return HTML for the home page nav item
This would typically be a LI

public render

string NavigationMenu::render ( );

Return HTML for a mega menu.

You shouldn't need to modify or extend this method;
If you do then your use case is probably too bespoke for this class.

protected subMenu

string NavigationMenu::subMenu ( Treenode $parent_node , array $groups , Treenode $selected_node , array $selected_ancestors );

Return HTML for a drop-down sub menu