Developer manual

navigation

The navigation spring tag returns either an html UL list of links to pages or attributes about the navigation

Updated: Type: springtag

Method

<navigation attribute="value"/>

Current

Request Attributes

  Attribute Type Description Default Required?
current depth number The depth (level) of the navigation to include
The top most level is '0'
0 No
current limit number The number of descending levels to include. 10 No
current show option Alter the output from the navigation script.
Allowed values: breadcrumbs, count, parentid, related, selected

• breadcrumbs: returns the path to the currently selected page as a breadcrumb list
• count: returns the number of items at the current depth
• parentid: returns the parentid of the specified depth
• related: returns links to other pages at the specified depth
• selected: returns all parent nodes and only child nodes of the selected folder
No
current prefix string Used to add a prefix when used with the show="count" parameter, or show="parentid" parameter No
current title string Used to add a title when used with the show="related" parameter No
current id string Used to set the html id of the container tag returned in the results 'related' | 'navlist' | 'breadcrumb' No

Examples

#1

Request

<navigation depth="0"/>

Returns a nested list 10 levels deep for all nodes. (As would be used for drop down menus).

#2

Request

<navigation depth="1" limit="2"/>

Returns a nested list of the 2nd and 3rd level nodes.

Response

<?xml version="1.0"?>
<ul class="navigation depth-1">
    <li class="d2 p1 first">
        <a id="page-example" class="page pages" href="/view/sample/example/">Example</a>
    </li>
    <li class="selected d2 p2">
        <a id="folder-another-example" class="folder pages expandable" href="/view/another-example/">Another Example</a>
        <ul class="navigation depth-2">
            <li class="d3 p1 first">
                <a id="page-second" class="page pages" href="/view/another-example/second/">Second</a>
            </li>
        </ul>
    </li>
</ul>

#3

Request

<navigation depth="1" limit="2" show="selected"/>

Returns a nested list of the 2nd level nodes, and any 3rd level nodes of the currently selected 2nd level node.

#4

Request

<navigation depth="0" show="breadcrumbs"/>

Returns a breadcrumb of navigation from the top level to the currently selected page.

Response

<p id="breadcrumb">
    <a class="home" href="/">You are here</a>
    <span class="prefix arrow"> &gt; </span>
    About Us
</p>

#5

Request

<navigation depth="0" show="count" prefix="count-"/>

Returns the number of items at the specified depth. Used to set class names in layout.xml inside <attribute> tags.

Response

count-2

The prefix field is optional.

#6

Request

<navigation depth="0" limit="1" show="parentid" prefix="section-"/>

Returns the parentid of the specified depth. Used to set class names in layout.xml inside <attribute> tags.

Response

parentid-about-us

The prefix field is optional.