SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class Navigation

Provides navigation functions

Variables

NameVisibilityDescription
$page_node_matcher (static) 
$pmm2_nav_id (static) 
$root_node (static) 

Functions

NameVisibilityDescription
bannerpublic (static)Returns the filename to use for a banner image, or NULL if no appropriate banner was found
breadcrumbpublic (static)Renders breadcrumbs for the current page
buildBrowserTitlepublic (static)Builds the title that gets put into TITLE tags in the head of the page
clearCachepublic (static)Nuke the navigation from the cache.
currentRevealpublic (static)Draws a current-reveal menu.
currentRevealDrawnodeprivate (static)Draws a single item, and its sub-items
customBreadcrumbpublic (static)Renders a custom breadcrumb based on an array of crumbs.
getAllPagespublic (static)Returns an array of all pages.
getCrumbspublic (static) 
getMatchedNodepublic (static)Alias for Navigation::matchedNode()
getPageNodeMatcherpublic (static)Gets the matcher that is used to get the current page
getRootNodepublic (static)Gets the root node of the currently loaded navigation tree
loadPageTreepublic (static)Loads the page tree from the database
matchedNodepublic (static)Finds the node in the page tree which matched the specified TreenodeMatcher.
nonDropdownpublic (static)Generates a menu which does not have dropdowns, but just has the top-level items
pmm2public (static)Draws a pmm2 menu, with the current page highlighted in the menu
pmm2Drawnodeprivate (static)Draws a single item, and its sub-items
renderCrumbspublic (static)Renders a custom breadcrumb based on an array of crumbs
rootNodepublic (static)Alias for Navigation::getRootNode()
sectionNamepublic (static)Returns the name of this section, or the site name if no reasonable section can be determined.
setPageNodeMatcherpublic (static)Sets a matcher that should be used to find the current page in the tree
simpleMenupublic (static)Returns a simple menu
simpleMenuDrawnodeprivate (static)Private node drawing function for SuperFish menu.
superfishpublic (static)Draws a superfish menu, with the current page highlighted in the menu
superfishDrawnodeprivate (static)Private node drawing function for SuperFish menu.
zippmenuChildrenpublic (static)Draws a UL of children for a zippmenu

public banner

unknown Navigation::banner ( );

Returns the filename to use for a banner image, or NULL if no appropriate banner was found

public breadcrumb

string Navigation::breadcrumb ( [ string $seperator_front [, array $post_crumbs [, string $seperator_back ]]] );

Renders breadcrumbs for the current page

public buildBrowserTitle

unknown Navigation::buildBrowserTitle ( string $page_title );

Builds the title that gets put into TITLE tags in the head of the page
Just glues the site title onto the end of the page title

public clearCache

void Navigation::clearCache ( );

Nuke the navigation from the cache.
Assumes the user is logged into the admin

public currentReveal

void Navigation::currentReveal ( );

Draws a current-reveal menu.
This is a menu where the top level items all get shown, but the children
only get shown for active items.

Uses the same HTML as the pmm2 menu, just because that HTML has plenty of
classes and ids, and I already had the code for that menu :)

See http://www.rymill.com.au/ for an example of this type of menu.

private currentRevealDrawnode

void Navigation::currentRevealDrawnode ( PageNode $node , int $depth );

Draws a single item, and its sub-items

public customBreadcrumb

string Navigation::customBreadcrumb ( array $crumbs [, string $seperator_front [, string $seperator_back ]] );

Renders a custom breadcrumb based on an array of crumbs.
This includes a home tag.

public getAllPages

unknown Navigation::getAllPages ( [ mixed $parent [, mixed $indent ]] );

Returns an array of all pages.

public getCrumbs

array Navigation::getCrumbs ( [ array|null $post_crumbs ] );

This function does not have a description

public getMatchedNode

unknown Navigation::getMatchedNode ( );

Alias for Navigation::matchedNode()

public getPageNodeMatcher

TreeNodeMatcher Navigation::getPageNodeMatcher ( );

Gets the matcher that is used to get the current page

public getRootNode

unknown Navigation::getRootNode ( );

Gets the root node of the currently loaded navigation tree

public loadPageTree

PageNode Navigation::loadPageTree ( [ int $subsite_id [, bool $is_admin [, bool $set_root ]]] );

Loads the page tree from the database

public matchedNode

null|Treenode Navigation::matchedNode ( );

Finds the node in the page tree which matched the specified TreenodeMatcher.

public nonDropdown

void Navigation::nonDropdown ( );

Generates a menu which does not have dropdowns, but just has the top-level items

public pmm2

void Navigation::pmm2 ( );

Draws a pmm2 menu, with the current page highlighted in the menu

private pmm2Drawnode

void Navigation::pmm2Drawnode ( PageNode $node , int $depth , mixed $pmm_max_depth , mixed $pmm_nav_limit );

Draws a single item, and its sub-items

public renderCrumbs

string Navigation::renderCrumbs ( array $crumbs [, string $seperator_front [, string $seperator_back ]] );

Renders a custom breadcrumb based on an array of crumbs

public rootNode

unknown Navigation::rootNode ( );

Alias for Navigation::getRootNode()

public sectionName

unknown Navigation::sectionName ( );

Returns the name of this section, or the site name if no reasonable section can be determined.

public setPageNodeMatcher

void Navigation::setPageNodeMatcher ( TreeNodeMatcher $page_node_matcher );

Sets a matcher that should be used to find the current page in the tree

public simpleMenu

array Navigation::simpleMenu ( );

Returns a simple menu

private simpleMenuDrawnode

void Navigation::simpleMenuDrawnode ( mixed $node , mixed $depth , mixed $pmm_max_depth );

Private node drawing function for SuperFish menu.

public superfish

void Navigation::superfish ( );

Draws a superfish menu, with the current page highlighted in the menu

private superfishDrawnode

void Navigation::superfishDrawnode ( mixed $node , mixed $depth , mixed $pmm_max_depth );

Private node drawing function for SuperFish menu.

public zippmenuChildren

void Navigation::zippmenuChildren ( mixed $page_url );

Draws a UL of children for a zippmenu