-
Notifications
You must be signed in to change notification settings - Fork 6
Parameters
Name | Type | Default |
---|---|---|
activeClass | string | active |
activeClassOnAncestors | boolean | false |
ancestorActiveClass | string | active |
breadcrumbs | boolean | false |
class | string | null |
disableActiveClass | boolean | false |
id | string | null |
ignoreIncludeInNavigation | boolean | false |
maxDepth | integer | 0 |
reverseNodes | boolean | false |
skipDisabledEntries | boolean | false |
startDepth | integer | 0 |
startWithActive | boolean | false |
startWithAncestorOfActive | boolean | false |
startWithChildrenOfActive | boolean | false |
startWithChildrenOfNodeId | integer | 0 |
startWithNodeId | integer | 0 |
startWithSiblingsOfActive | boolean | false |
startXLevelsAboveActive | boolean | false |
wrapType | string | ul |
The class name you would like to associate with the active node.
'activeClass' : 'YOUR_ACTIVE_CLASS'
Determines if you'd like to include an active class on the ancestors of the active node.
'activeClassOnAncestors' : true
The class name you would like to associate with the ancestors of your active node. Requires activeClassOnAncestors to be true.
'ancestorActiveClass' : 'YOUR_ANCESTOR_ACTIVE_CLASS_NAME'
Build breadcrumbs to the active node.
{% set navConfig = {
'breadcrumbs' : true,
} %}
{{ craft.navee.nav('mainNavigation', navConfig) }}
- Item 1
- Item 1.1
- Item 1.1.1
- Item 1.1.2
- Item 1.1.2.1
- Item 1.1.2.2 (ACTIVE NODE)
- Item 1.1.3
- Item 1.2
- Item 2
- Item 2.1
- Item 2.2
- Item 1
- Item 1.1
- Item 1.1.2
- Item 1.1.2.2 (ACTIVE NODE)
A class name which will be added to the outermost wrapper of your navigation.
'class' : 'YOUR_CLASS_NAME'
When set to true, no nodes will be given an active class.
'disableActiveClass' : true
An id which will be added to the outermost wrapper of your navigation.
'id' : 'YOUR_ID'
Each node has an optional "Include In Navigation" setting within the control panel. This parameter allows you to override the setting from within the node.
'ignoreIncludeInNavigation' : true
The maximum depth of a navigation from the root node.
'maxDepth' : 3
Reverse the order of all nodes in a tree.
'reverseNodes' : true
Skip any nodes linked to entries which are disabled.
'skipDisabledEntries' : true
The depth at which to start your navigation.
'startDepth' : 2
Start your navigation with the active node.
{% set navConfig = {
'startWithActive' : true,
} %}
{{ craft.navee.nav('mainNavigation', navConfig) }}
- Item 1
- Item 1.1 (ACTIVE NODE)
- Item 1.1.1
- Item 1.1.2
- Item 1.1.2.1
- Item 1.1.2.2
- Item 1.1.3
- Item 1.2
- Item 2
- Item 2.1
- Item 2.2
- Item 1.1 (ACTIVE NODE)
- Item 1.1.1
- Item 1.1.2
- Item 1.1.2.1
- Item 1.1.2.2
- Item 1.1.3
Start your navigation with the root node of the branch in which the active node exists.
{% set navConfig = {
'startWithAncestorOfActive' : true,
} %}
{{ craft.navee.nav('mainNavigation', navConfig) }}
- Item 1
- Item 1.1
- Item 1.1.1
- Item 1.1.2 (ACTIVE NODE)
- Item 1.1.2.1
- Item 1.1.2.2
- Item 1.1.3
- Item 1.2
- Item 2
- Item 2.1
- Item 2.2
- Item 1
- Item 1.1
- Item 1.1.1
- Item 1.1.2 (ACTIVE NODE)
- Item 1.1.2.1
- Item 1.1.2.2
- Item 1.1.3
- Item 1.2
Start your navigation with the children of the active node.
{% set navConfig = {
'startWithChildrenOfActive' : true,
} %}
{{ craft.navee.nav('mainNavigation', navConfig) }}
- Item 1
- Item 1.1 (ACTIVE NODE)
- Item 1.1.1
- Item 1.1.2
- Item 1.1.2.1
- Item 1.1.2.2
- Item 1.1.3
- Item 1.2
- Item 2
- Item 2.1
- Item 2.2
- Item 1.1.1
- Item 1.1.2
- Item 1.1.2.1
- Item 1.1.2.2
- Item 1.1.3
Start your navigation with the children of the node id passed.
{% set navConfig = {
'startWithChildrenOfNodeId' : 99,
} %}
{{ craft.navee.nav('mainNavigation', navConfig) }}
Start your navigation with the node id passed.
{% set navConfig = {
'startWithNodeId' : 99,
} %}
{{ craft.navee.nav('mainNavigation', navConfig) }}
Start your navigation with the siblings of the active node.
{% set navConfig = {
'startWithSiblingsOfActive' : true,
} %}
{{ craft.navee.nav('mainNavigation', navConfig) }}
- Item 1
- Item 1.1 (ACTIVE NODE)
- Item 1.1.1
- Item 1.1.2
- Item 1.1.2.1
- Item 1.1.2.2
- Item 1.1.3
- Item 1.2
- Item 2
- Item 2.1
- Item 2.2
- Item 1.1 (ACTIVE NODE)
- Item 1.1.1
- Item 1.1.2
- Item 1.1.2.1
- Item 1.1.2.2
- Item 1.1.3
- Item 1.2
Start your navigation x levels above the active node.
{% set navConfig = {
'startXLevelsAboveActive' : 1,
} %}
{{ craft.navee.nav('mainNavigation', navConfig) }}
- Item 1
- Item 1.1
- Item 1.1.1
- Item 1.1.2 (ACTIVE NODE)
- Item 1.1.2.1
- Item 1.1.2.2
- Item 1.1.3
- Item 1.2
- Item 2
- Item 2.1
- Item 2.2
- Item 1.1
- Item 1.1.1
- Item 1.1.2 (ACTIVE NODE)
- Item 1.1.2.1
- Item 1.1.2.2
- Item 1.1.3
- Item 1.2
When using craft.navee.nav() by default your nodes will be presented in an unordered list. If you'd like to override this with something like an ordered list, you can pass the wrapType parameter.
'wrapType' : 'ol'