FUEL CMS User Guide : Version 1.4


Fuel Navigation Class

This class extends the Fuel_module class.

Properties Reference

Property Default Value Description
protected
module N/A Value is set to "navigation"

Function Reference [+]

$this->fuel->navigation->render([$params=array()])

Renders a navigation structure using the http://docs.getfuelcms.com//libraries/menu">Menu class. The http://docs.getfuelcms.com//helpers/fuel_helper">fuel_nav helper function is an alias to this method.

  • items: the navigation items to use. By default, this is empty and will look for the nav.php file or the records in the Navigation module
  • file: the name of the file containing the navigation information
  • var: the variable name in the file to use
  • parent: the parent id you would like to start rendering from. This is either the database ID or the nav array key of the menu item
  • root: the equivalent to the root_value attribute in the Menu class. It states what the root value of the menu structure should be. Normally you don't need to worry about this
  • group_id: the group ID in the database to use. The default is 1. Only applies to navigation items saved in the admin
  • exclude: nav items to exclude from the menu. Can be an array or a regular expression string
  • return_normalized: returns the raw normalized array that gets used to generate the menu
  • render_type: options are basic, breadcrumb, page_title, collapsible, delimited, array. Default is 'basic'
  • active_class: the active css class. Default is 'active'
  • active: the active menu item
  • styles: css class styles to apply to menu items... can be a nested array
  • first_class: the css class for the first menu item. Default is first
  • last_class: the css class for the last menu item. Default is last
  • depth: the depth of the menu to render at
  • use_titles: use the title attribute in the links. Default is FALSE
  • container_tag: the html tag for the container of a set of menu items. Default is ul
  • container_tag_attrs: html attributes for the container tag
  • container_tag_id: html container id
  • container_tag_class: html container class
  • cascade_selected: cascade the selected items. Default is TRUE
  • include_hidden: include menu items with the hidden attribute. Default is FALSE
  • item_tag: the html list item element. Default is 'li'
  • item_id_prefix: the prefix to the item id
  • item_id_key: either id or location. Default is 'id'
  • use_nav_key: determines whether to use the nav_key or the location for the active state. Default is "AUTO"
  • pre_render_func: function to apply to menu labels before rendering
  • delimiter: the html element between the links
  • arrow_class: the class for the arrows used in breadcrumb type menus
  • display_current: determines whether to display the current active breadcrumb item
  • home_link: the root home link
  • append: appends additional menu items to those items already set (e.g. from the $nav array or from the navigation module). Good to use on dynamic pages where you need to dynamically set a navigation item for a page
  • order: the order to display... for page_title ONLY
  • language: select the appropriate language
  • include_default_language: will merge in the default language with the results. Default is FALSE
  • language_default_group: the default group to be used when including a default language. Default is FALSE

Returns

string

Parameters

(array) $params config preferences

$this->fuel->navigation->basic([$params=array()])

Renders a basic unordered list navigation menu.

Returns

string

Parameters

(array) $params config preferences (optional)

$this->fuel->navigation->breadcrumb([$params=array()])

Renders a breadcrumb navigation menu.

Returns

string

Parameters

(array) $params config preferences (optional)

$this->fuel->navigation->collapsible([$params=array()])

Renders a collapsible navigation menu.

Returns

string

Parameters

(array) $params config preferences (optional)

$this->fuel->navigation->page_title([$params=array()])

Renders a page title using the navigation structure.

Returns

string

Parameters

(array) $params config preferences (optional)

$this->fuel->navigation->delimited([$params=array()])

Renders a delimited menu (e.g. Home | About | Products | Contact).

Returns

string

Parameters

(array) $params config preferences (optional)

$this->fuel->navigation->data([$params=array()])

Returns a nested array representing the navigation structure.

Returns

string

Parameters

(array) $params config preferences (optional)

$this->fuel->navigation->upload([$params=array()])

Uploads a static'navigation structure which is most like the fuel/application/views/_variables/nav.php file.

Returns

boolean

Parameters

(array) $params config preferences (optional)

$this->fuel->navigation->groups()

Returns the menu groups as an array of objects.

Returns

array

$this->fuel->navigation->group('$group')

Returns a specific menu group object.

Returns

object

Parameters

(mixed) $group Can be a groups name or ID value

$this->fuel->navigation->mode()

Returns the rendering mode for the navigation module.

Returns

boolean