Personal tools
Views

FAQ/Layout and Design/Menu Manager Node Parameters

From CMSMS

This list is taken from the help file available from the CMSMS menu manager layout page. References to additional parameters appear in the forums.

The parameters for the $node object used in the template are as follows:

  • $node->id -- Content ID
  • $node->url -- URL of the Content
  • $node->accesskey -- Access Key, if defined
  • $node->tabindex -- Tab Index, if defined
  • $node->titleattribute -- Description or Title Attribute (title), if defined
  • $node->hierarchy -- Hierarchy position, (e.g. 1.3.3)
  • $node->depth -- Depth (level) of this node in the current menu
  • $node->prevdepth -- Depth (level) of the node that was right before this one
  • $node->haschildren -- Returns true if this node has child nodes to be displayed
  • $node->menutext -- Menu Text
  • $node->alias -- Page alias
  • $node->target -- Target for the link. Will be empty if content doesn't set it.
  • $node->index -- Count of this node in the whole menu
  • $node->parent -- True if this node is a parent of the currently selected page


Optional Parameters

  • (optional) includeprefix="" - Include only those items who's page alias matches one of the specified (comma separated) prefixes. This parameter cannot be combined with the excludeprefix parameter.
  • (optional) excludeprefix="" - Exclude all items (and their children) who's page alias matches one of the specified (comma separated) prefixes. This parameter must not be used in conjunction with the includeprefix parameter.
  • (optional) template="bulletmenu.tpl" - The template to use for displaying the menu. Templates will come from the database templates unless the template name ends with .tpl, in which case it will come from a file in the MenuManager templates directory (defaults to simple_navigation.tpl)
  • (optional) start_page="home" - Starts the menu displaying at the given start_page and showing that element and it's children only. Takes a page alias.
  • (optional) start_element="1.2" - Starts the menu displaying at the given start_element and showing that element and it's children only. Takes a hierarchy position (e.g. 5.1.2).
  • (optional) start_level="2" - This option will have the menu only display items starting a the given level. An easy example would be if you had one menu on the page with number_of_levels='1'. Then as a second menu, you have start_level='2'. Now, your second menu will show items based on what is selected in the first menu.
  • (optional) show_root_siblings="1" - This option only becomes useful if start_element or start_page are used. It basically will display the siblings along side of the selected start_page/element.
  • (optional) show_all="0" - This option will cause the menu to show all nodes even if they are set to not show in the menu. It will still not display inactive pages however.
  • (optional) number_of_levels="1" - This setting will only allow the menu to only display a certain number of levels deep.
  • (optional) items="contact,home" - Use this item to select a list of pages that this menu should display. The value should be a list of page aliases separated with commas.
  • (optional) collapse="1" - Turn on (set to 1) to have the menu hide items not related to the current selected page.
  • (optional) lang="en_US" - Parameter is used to specify what language to use for display on the frontend. Not all modules support or need this.