Start page / Template development / Template syntax / Functions / in the header / Navigation

Navigation

Contents

The Navigation function is used to represent the page structure on the generated pages as defined by the site store. You use the Navigation function within the page template to define how the navigation features should be output. The menu levels that have been created in the site store are applied automatically. Different types of navigation can be displayed by setting the individual parameters. The function always relies on the same basic framework regardless of whether the navigation method is based on graphics or text (see Example of the function).

If the navigation functions are created in the header area of the page template, the function results have to be output within the HTML area. The return value for each navigation function is output at the required location with a $CMS_VALUE(...)$ instruction.

If you want several navigation features to be displayed in separate areas of the same page, a dedicated navigation function must be created in the header area of the page template and output in the HTML area for each of the subnavigation features concerned. If, for example, the page has two navigation features relating to a main menu and a submenu, navigation functions must be stored at two different points within the page template (see Example of function result output).

Example (of function):

<CMS_FUNCTION name="Navigation" resultname="fr_pt_mainNavi">
<CMS_PARAM name="expansionVisibility" value="standard"/>
<CMS_PARAM name="wholePathSelected" value="1"/>
<CMS_ARRAY_PARAM name="unselectedHTML">
<CMS_ARRAY_ELEMENT><![CDATA[...]]></CMS_ARRAY_ELEMENT>
<CMS_ARRAY_ELEMENT><![CDATA[...]]></CMS_ARRAY_ELEMENT>
<CMS_ARRAY_ELEMENT><![CDATA[...]]></CMS_ARRAY_ELEMENT>
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="selectedHTML">
<CMS_ARRAY_ELEMENT index="0..3"><![CDATA[...]]></CMS_ARRAY_ELEMENT>
</CMS_ARRAY_PARAM>
</CMS_FUNCTION>

Example (of function result output):

<!-- 1st Navigation -->
$CMS_VALUE(fr_pt_mainnav)$
<!-- 1st Navigation end -->
<!-- 2nd Navigation -->
$CMS_VALUE(fr_pt_subnav)$
<!-- 2nd Navigation end -->
Important The navigation function can be configured so that an editor working in ContentCreator can move pages or menu items directly on the preview page or create them using drag-and-drop. To enable this, the surrounding HTML element of the relevant navigation element must include an editorId() call. For more information, see also the relevant page under ContentHighlighting and EasyEdit.

Navigation function syntax

The basic structure of the Navigation function is as follows:

<CMS_FUNCTION name="Navigation" resultname="IDENTIFIER">
<CMS_PARAM name="expansionVisibility" value="KEYWORD" />
<CMS_PARAM name="wholePathSelected" value="BOOLEAN_VALUE" />
<CMS_PARAM name="selectedNode" value="IDENTIFIER" />
<CMS_PARAM name="root" value="IDENTIFIER" />
<CMS_PARAM name="siteMap" value="BOOLEAN_VALUE" />
<CMS_PARAM name="menuFirst" value="BOOLEAN_VALUE" />
<CMS_PARAM name="suppressEmptyFolders" value="BOOLEAN_VALUE" />
<CMS_ARRAY_PARAM name="beginHTML">
<CMS_ARRAY_ELEMENT><![CDATA[WERT]]></CMS_ARRAY_ELEMENT>
...
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="innerBeginHTML">
<CMS_ARRAY_ELEMENT index="INTEGER"><![CDATA[VALUE]]></CMS_ARRAY_ELEMENT>
...
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="unselectedHTML">
<CMS_ARRAY_ELEMENT index="INTEGER..INTEGER"><![CDATA[VALUE]]></CMS_ARRAY_ELEMENT>
...
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="selectedHTML">
<CMS_ARRAY_ELEMENT><![CDATA[VALUE]]></CMS_ARRAY_ELEMENT>
...
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="pageRefRendering">
<CMS_ARRAY_ELEMENT index="INTEGER"><![CDATA[VALUE]]></CMS_ARRAY_ELEMENT>
...
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="delimiter">
<CMS_ARRAY_ELEMENT index="INTEGER..INTEGER"><![CDATA[VALUE]]></CMS_ARRAY_ELEMENT>
...
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="selectedDelimiter">
<CMS_ARRAY_ELEMENT><![CDATA[VALUE]]></CMS_ARRAY_ELEMENT>
...
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="innerEndHTML">
<CMS_ARRAY_ELEMENT index=""><![CDATA[VALUE]]></CMS_ARRAY_ELEMENT>
...
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="endHTML">
<CMS_ARRAY_ELEMENT index="INTEGER..INTEGER"><![CDATA[VALUE]]></CMS_ARRAY_ELEMENT>
...
</CMS_ARRAY_PARAM>
</CMS_FUNCTION>
Important For common notes about the syntax of header functions please see introducing Functions page.

Navigation function parameters

The following parameters can be used with the Navigation function:

Important expansionVisibility is a mandatory parameter. All the other parameters are optional, but the unselectedHTML and selectedHTML parameters should be used once to ensure that the navigation items are visible.

The values of the individual parameters can be specified in the form of

  • constants (<CMS_PARAM>)
  • expressions (<CMS_VALUE_PARAM>) or
  • template fragments (<CMS_ARRAY_PARAM>)

The table below lists what options are available in this regard.

X means: Option available and recommended;
O means: Option available but not recommended;
- means: Option not available

Parameters

Specification of a constant

Specification of expressions

Specification of a template fragment

Mandatory parameter

beginHTML

-

-

X

No

delimiter

-

-

X

No

endHTML

-

-

X

No

expansionVisibility

X

O

-

No

innerBeginHTML

-

-

X

No

innerEndHTML

-

-

X

No

menuFirst

X

O

-

No

multiPages

X

-

-

No

pageRefRendering

-

-

X

No

root

X

O

-

No

selectedDelimiter

-

-

X

No

selectedHTML

-

-

X

No

selectedNode

X

O

-

No

siteMap

X

O

-

No

suppressEmptyFolders

X

O

-

No

unselectedHTML

-

-

X

No

wholePathSelected

X

O

-

No

     

Parameter expansionVisibility

The expansionVisibility parameter specifies how the expanded navigation areas are to be handled, i.e., the approach to be adopted when expanding a particular navigation item. The following table provides an overview of which values are supported by this parameter and the effect of selecting specific keywords.

For better understanding, a graphic has been included for each keyword.

The graphics use orange squares to represent the areas of the tree that are visible and gray circles to represent the areas that are not visible when a particular keyword is used on the selected page (large orange square).

Example:

<CMS_PARAM name="expansionVisibility" value="all" /> 

All elements of the first menu level are shown in full.

Keywords for expansionVisibility:

standard

If the standard keyword is selected, the navigation tree is fully collapsed.
The current menu item is displayed along with its children, its siblings, its parents, and the siblings of its parents.

all

If the all keyword is selected as the value, the entire navigation tree is fully expanded and all elements are displayed.

pathonly

The pathonly keyword results in just the current menu item being displayed along with its children and the entire chain of parents.

purepath

The purepath keyword is largely identical to the pathonly parameter, except that the children of the current menu item are hidden.
Consequently, this navigation type only reveals the path for the current menu item.

parentpath

The parentpath keyword is largely identical to the purepath parameter, except that with parentpath the "Display in navigation menu?" setting on the "Names" tab is evaluated for menu levels as well. If, for example, the "Display in navigation menu?" option has been disabled for a particular menu level and parentpath has been set, the path is only output from the root node up to the last visible menu level. In other words, as soon as the software encounters a menu level after the root node with the "Display in navigation menu?" option disabled, it stops displaying menu levels from that point onward.

subtree

With the subtree parameter, only the subtree that is (exclusively) linked to the current menu item is shown. The levels are counted (starting from 0) as of the children of the current menu item.

There are two ways to display the current menu item:

  1. By using an additional navigation function with the standard keyword set for the expansionVisibility parameter. The wholePathSelected parameter should not be specified. Furthermore, only template fragments should be created exclusively via the selectedHTML parameter.
  2. By accessing the menu level via the #global system object (e.g., with $CMS_VALUE(#global.node.parent)$)


Note: If the subtree parameter is set (expansionVisibility="subtree"), any start node that has been specified via the root parameter will be ignored.

  

menuFirst parameter

The menuFirst parameter defines which navigation features should be output first: the menu levels (value: 1; default value) or the page references (value: 0).

<CMS_PARAM name="menuFirst" value="1" />

Important The parameter has no effect unless the siteMap parameter has been specified as well.

multiPages parameter

The multiPages parameter supplements the siteMap parameter. You can use it to define whether just the first subpage or whether all the generated subpages of multi-pages should be included in a sitemap.

If the value is set to 0 (= default value), only the first subpage of each multi-page (as per the distribution setting defined on the “Content” tab for the associated page reference) is included.

If the value is set to 1, each generated subpage of the multi-page is included in the sitemap.

<CMS_PARAM name="multiPages" value="1"/> 

Once again, this parameter relies on the settings that have been made on the “Content” tab for the page references. The distribution instruction that has been defined here for the multi-page (how many datasets are to be displayed on a page and the maximum number of pages that can be generated) determines how many datasets the sitemap should show per subpage and how many subpages there should be.

The subpages are always displayed in the sitemap using the reference name of the page referenced in the page store. Consequently, the sitemap entries for all subpages within a multi-page are all labeled in the same way initially. To enable dynamic labeling, you can use the “Variable for sitemap text” field on the “Content” tab to select a column from the data source to serve as the label instead.

Example:

For the purpose of this example, let's assume that the multi-page is based on a data source containing a “Text” column with the following entries: 1. Datensatz, 2. Datensatz, and 3. Datensatz. Let's also assume that the obligatory column fs_id has been included in the data source (a column containing consecutive ID numbers for the individual datasets in the table.)

Navigation function (parameter

These three datasets are output on the multi-page.

If you were to select the “Text” column in the “Variable for sitemap text” field on the “Content” tab, enter 0 as the “Maximum number of pages”, and define an ascending sort order based on the fs_id column, the entries for the generated subpages would (for instance) be as follows, depending on the distribution setting:

Distribution (on “Content” tab)

Explanation of distribution setting

Sitemap output

Explanation of sitemap output

Number of entries per page: 0

One subpage containing all three datasets is generated.

* 1. Datensatz - 3. Datensatz

This results in one entry for the multi-page in the sitemap.

If a subpage contains more than one dataset, the first and the last dataset on the page are used for the label in the sitemap. These are separated from one another by means of a " - " character.

Number of entries per page: 1

One subpage is generated for each of the three datasets.

* 1. Datensatz
* 2. Datensatz
* 3. Datensatz

This results in three entries for the multi-page in the sitemap.
The dataset contained within each one is used for the label.

Number of entries per page: 2

Two subpages are generated: The first one contains the first two datasets (dataset 1 and dataset 2) and the second one contains dataset 3.

* 1. Datensatz - 2. Datensatz
* 3. Datensatz

This results in two entries for the multi-page in the sitemap.
The first two datasets are used to label the first subpage (separated by a " - " character) and the third dataset is used to label the second subpage.

    

A multiPages parameter that has been set to a value of 1 will have no effect in the case of “single” page references (i.e., not a page reference for a multi-page).

Important The parameter will only have an effect if the siteMap parameter has been set to a value of 1 as well.

root parameter

The root parameter defines the start node for navigation.

Either a folder or a page can be specified as the start node.

To specify a folder, use the pagefolder: keyword followed by the folder identifier:

<CMS_PARAM name="root" value="pagefolder:BEZEICHNER" />

To specify a page reference, use the pageref: keyword followed by the page reference identifier:

<CMS_PARAM name="root" value="pageref:BEZEICHNER" />

If a page reference is specified, the menu level above the page reference (= its parent) is used as the start node.

If the root parameter is not specified, the root of the site store is used as the start node for navigation.

Important Specifying the root parameter changes how the levels are counted.
In this case, the direct children of the specified node become the 0 level for the navigation system.
Important The root parameter will be ignored if the subtree parameter has also been set (expansionVisibility="subtree").

selectedNode parameter

By specifying the selectedNode parameter, you can define a folder or a page so that the navigation function regards it as the current/selected element.

To specify a folder, use the pagefolder: keyword followed by the folder identifier:

<CMS_PARAM name="selectedNode" value="pagefolder:BEZEICHNER" />

To specify a page, use the pageref: keyword followed by the page reference identifier:

<CMS_PARAM name="selectedNode" value="pageref:BEZEICHNER" />

siteMap parameter

If the siteMap parameter is set to a value of 1, the page references are output in the navigation system as well.

If the parameter is not specified or if the value is set to 0, only menu levels from the site store are output.

<CMS_PARAM name="siteMap" value="1" />

Output of page references is set via the pageRefRendering parameter.

Important In the case of multi-pages, only the first of the subpages generated is included in the sitemap by default. If you want all the generated subpages to be included, you must use the multiPages parameter as well.

suppressEmptyFolders parameter

Any menu levels that do not contain a page reference can be excluded from output by using the suppressEmptyFolders parameter.

A value of 1 suppresses the output of menu levels without a page reference, but a value of 0 (= default value) does not.

<CMS_PARAM name="suppressEmptyFolders" value="1" />

wholePathSelected parameter

If the wholePathSelected parameter is set to a value of 1, the entire path is regarded as selected from the current element through to the root (parent chain). This might be necessary, for example, if you wanted these elements to be displayed in a different color from the unselected navigation elements.

If the wholePathSelected parameter is set to 0 or has not been specified, only the element located directly above the page reference (parent or menu level) is treated as selected (= default value).

Example:

<CMS_PARAM name="wholePathSelected" value="1" /> 

All the elements in the parent chain (all parents through to the root) are treated as selected. Output of the selected and unselected elements is set via the selectedHTML and unselectedHTML parameters.

Output fragments

The <CMS_ARRAY_ELEMENT> tag within the output fragments (<CMS_ARRAY_PARAM> tags) determines how navigation should be displayed in the browser. A separate <CMS_ARRAY_ELEMENT> tag is created for each navigation level that is to be displayed.

The optional index attribute can be specified for each level. You use this attribute to specify which level you want the entry concerned to apply to. The levels are counted starting from 0. Consequently, 0 is the top level. If no index attribute has been specified,the level is calculated automatically, i.e., the first entry without index is interpreted as 0, the second is interpreted as 1, and so on. In addition, a range can be defined for index, e.g., 0..2 (from 0 to 2).

Example:

<CMS_ARRAY_PARAM name="selectedHTML">
<CMS_ARRAY_ELEMENT index="0">
<![CDATA[<a href="$CMS_REF(#nav.ref)$" ...">$CMS_VALUE(#nav.label)$</a>]]>
</CMS_ARRAY_ELEMENT>
</CMS_ARRAY_PARAM>

Each menu item in a navigation system usually links to a new page. In other words: Each array element requires a
<![CDATA[...]]> tag so that a link can be inserted. A link can be entered within the <![CDATA[...]]> tag using <a href="">...</a>. However, given that you will not always want to link to the same page, a link to an object from the site store is required instead of a constant page.

Important Specifying the root parameter changes how the levels are counted.
In this case, the direct children of the specified node become the 0 level for the navigation system.

beginHTML/endHTML parameters

The two parameters beginHTML and endHTML are used to define the template fragments for each individual navigation level, which are each output before (beginHTML) or after (endHTML) an element. This means that each entry on the corresponding level and all its subitems are included within these two parameters (see also Example: Output of levels and parameters).

<CMS_ARRAY_PARAM name="beginHTML">
...
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="endHTML">
...
</CMS_ARRAY_PARAM>

delimiter/selectedDelimiter parameters

While the beginHTML and endHTML parameters are called for each individual entry in the navigation system, the content of the delimiter parameter is only output between two navigation elements located on the same level.

The selectedDelimiter parameter allows you to define a template fragment that is only output before and after the selected navigation entry on the level concerned.

Important The content of the selectedDelimiter parameter is not output before the first and not output after the last element on a level.

If the selectedDelimiter parameter is not specified and only the delimiter parameter has been set, the content of the delimiter parameter is displayed between all the navigation entries.

If the selectedDelimiter parameter is used exclusively, the content of the parameter is only output around a selected navigation element.

Important The delimiter and selectedDelimiter parameters are only used if the siteMap parameter has not been specified or has been set to a value of 0.

<CMS_ARRAY_PARAM name="delimiter">
...
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="selectedDelimiter">
...
</CMS_ARRAY_PARAM>

innerBeginHTML/innerEndHTML parameters

The two parameters innerBeginHTML and innerEndHTML are used to specify additional template fragments, which are to include all children of a navigation entry.

<CMS_ARRAY_PARAM name="innerBeginHTML">

</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="innerEndHTML">
...
</CMS_ARRAY_PARAM>

The index of the innerBeginHTML/innerEndHTML elements refers to the depth of the node whose child list it is meant to introduce. By definition, no further subpages should appear below the lowest menu level that is to be displayed. Consequently, the index of the innerBeginHTML/innerEndHTML surrounding elements usually has an upper limit that is one lower than for the other elements. Otherwise, the output of innerBeginHTML/innerEndHTML would be generated “below” nodes of the lowest level to be displayed (introduction of the child list), but this output would not actually contain any other elements (children) (see also Example: Output of levels and parameters).

selectedHTML/unselectedHTML parameters

The selectedHTML and unselectedHTML parameters define the template fragments that are to be used when outputting an element. selectedHTML is used to set the output of selected elements and unselectedHTML to set the output of unselected elements.

Example:

<CMS_ARRAY_PARAM name="selectedHTML">

</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="unselectedHTML">
...
</CMS_ARRAY_PARAM>
Important The selection behavior is controlled by the selectedNode and wholePathSelected parameters.

pageRefRendering parameter

The pageRefRendering parameter is used in a similar way to the selectedHTML and unselectedHTML parameters. The difference is that the template fragment specified via the pageRefRendering parameter is output for all the page references of a menu level.

Important This parameter is only taken into account if the siteMap parameter has been specified!

<CMS_ARRAY_PARAM name="pageRefRendering">

</CMS_ARRAY_PARAM>

Example – Output of levels and parameters

<ul>
beginHTML(0) unselectedHTML(0) endHTML(0)
beginHTML(0) unselectedHTML(0) endHTML(0)
beginHTML(0) unselectedHTML(0) endHTML(0)
beginHTML(0) selectedHTML(0)
innerBeginHTML(0)
beginHTML(1) selectedHTML(1)
innerBeginHTML(1)
beginHTML(2) unselectedHTML(2) endHTML(2)
beginHTML(2) selectedHTML(2) endHTML(2)
beginHTML(2) unselectedHTML(2) endHTML(2)
innerEndHTML(1)
endHTML(1)
beginHTML(1) unselectedHTML(1) endHTML(1)
beginHTML(1) unselectedHTML(1) endHTML(1)
innerEndHTML(0)
endHTML(0)
beginHTML(0) unselectedHTML(0) endHTML(0)
beginHTML(0) unselectedHTML(0) endHTML(0)
beginHTML(0) unselectedHTML(0) endHTML(0)
beginHTML(0) unselectedHTML(0) endHTML(0)
beginHTML(0) unselectedHTML(0) endHTML(0)
</ul>

System object within the Navigation function

Within the Navigation function, the #nav system object is available for calling several methods. The $CMS_VALUE(...)$ (output of content) or $CMS_REF(...)$ (resolution of a reference) instructions can be used for this purpose.

For instance, the #nav system object can be used to enter links within the <![CDATA[...]]> tags. Given that no constant values are to be specified here, preallocated variables are used instead.

Example:

"$CMS_REF(#nav.ref)$"
$CMS_VALUE(#nav.label)$

Overview

Attributes

Description

#nav.comment

A comment in the site store concerning the target node

#nav.data("IDENTIFIER")

The value of the variable specified via the identifier is returned from the site store

#nav.folder

Returns the current folder within the menu structure.

#nav.hasSubFolders

Determines whether the current navigation item has any children (subordinate menu levels/folders)

#nav.id

Unique server-wide identification number for the target node

#nav.isFirst

Returns whether the navigation item is the first one on the current level

#nav.isLast

Returns whether the navigation item is the last one on the current level

#nav.isFirstPageRef
(only in combination with pageRefRendering)

Returns whether this page reference is the first one on the current level

#nav.isLastPageRef
(only in combination with pageRefRendering)

Returns whether this page reference is the last one on the current level

#nav.label

Name of the relevant target node

#nav.level

Number of the navigation level. Counting starts at 0

#nav.levelPos

Position of the current folder on the current level. Counting starts at 0.

#nav.media

Image selected in the site store for the Normal field

#nav.media.height

Height of the image in pixels

#nav.media.width

Width of the image in pixels

#nav.mediaHighlight

Image selected in the site store for the with mouse pointer field

#nav.mediaHighlight.height

Height of the image in pixels

#nav.mediaHighlight.width

Width of the image in pixels

#nav.mediaHighlightSelected

Image selected in the site store for the Selected, with mouse pointer field

#nav.mediaHighlightSelected.height

Height of the image in pixels

#nav.mediaHighlightSelected.width

Width of the image in pixels

#nav.mediaSelected

Image selected in the site store for the Selected field

#nav.mediaSelected.height

Height of the image in pixels

#nav.mediaSelected.width

Width of the image in pixels

#nav.positions[INTEGER]

Indicates the position of the relevant folder on the level specified by an integer.
#nav.positions is a list. Therefore, it is important to ensure that the specified number is lower than the number of elements in the list (#nav.positions.size).

#nav.ref

Reference to the target node or the corresponding start node

#nav.ref.page.id

Unique server-wide identification number for the relevant page

#nav.selected

Determines whether or not the element is selected

  

#nav.comment

This method call outputs a comment. This comment can be entered on a language-dependent basis in the "Comment" field on one of the menu levels in the site store.

Example:

<img name=... src=... alt="$CMS_VALUE(#nav.comment)$"> 

#nav.id

The #nav.id method call returns the unique identification number for the node from the site store.

A unique identification number is often used for the purpose of generating onMouseOver effects (JavaScript).

Example:

<img name="i$CMS_VALUE(#nav.id)$" src="...">

#nav.label

The #nav.label method call returns the text that is assigned to the relevant menu item.

The method call is normally used in the following parameters:

  • pageRefRendering
  • selectedHTML
  • unselectedHTML

Example:

<a  href="$CMS_REF(#nav.ref)$" target="_blank">$CMS_VALUE(#nav.label)$</a>

#nav.ref

The #nav.ref method call returns the following from the site store: the link to the page reference that has been assigned to the relevant menu item.

The method call is normally used in the following parameters:

  • pageRefRendering
  • selectedHTML
  • unselectedHTML

Example:

<a  href="$CMS_REF(#nav.ref)$" target="_blank">$CMS_VALUE(#nav.label)$</a>

#nav.folder

The #nav.folder method call returns the link to the folder from the Site Store to be displayed in the navigation.

The method call is normally used in the following parameters:

  • selectedHTML
  • unselectedHTML

The information is required, for example, to check if the folder has a start page or a start folder.

Example:

$CMS_IF(#nav.folder == #global.node.parent)$
<Output for start page>
$CMS_ELSE$
<Output for start folder>
$CMS_END_IF$

#nav.ref.page.id

This method call can be used to output the identification number for the page from the page store as per the page reference.

The method call can only be used within the pageRefRendering parameter.

Important The pageRefRendering parameter is only evaluated if the siteMap parameter has been specified.

The identification number is required for the purpose of generating a PDF table of contents, for instance.

Example:

<img name="i$CMS_VALUE(#nav.ref.page.id)$" src="...">

Navigation function examples

Below are some examples of how to use the instruction within templates. The purpose of the examples is to point out the precise effect of the instruction and to assist template developers in creating their own templates.

Important The examples shown here must be adapted before they can be used within a project. For example, variable names need to be changed to the specific variable names of the project in which the instruction is to be used.
<CMS_HEADER>
<CMS_FUNCTION name="Navigation" resultname="nav">
<CMS_PARAM name="expansionVisibility" value="standard"/>
<CMS_ARRAY_PARAM name="innerBeginHTML">
<CMS_ARRAY_ELEMENT index="0..3"><![CDATA[<ul>]]></CMS_ARRAY_ELEMENT>
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="beginHTML">
<CMS_ARRAY_ELEMENT index="0..4"><![CDATA[<li>]]></CMS_ARRAY_ELEMENT>
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="unselectedHTML">
<CMS_ARRAY_ELEMENT index="0..4"><![CDATA[<a href="$CMS_REF(#nav.ref)$">$CMS_VALUE(#nav.label)$</a>]]></CMS_ARRAY_ELEMENT>
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="selectedHTML">
<CMS_ARRAY_ELEMENT index="0..4"><![CDATA[<a href="$CMS_REF(#nav.ref)$" style="color:#ff0000;">$CMS_VALUE(#nav.label)$</a>]]></CMS_ARRAY_ELEMENT>
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="endHTML">
<CMS_ARRAY_ELEMENT index="0..4"><![CDATA[</li>]]></CMS_ARRAY_ELEMENT>
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="innerEndHTML">
<CMS_ARRAY_ELEMENT index="0..3"><![CDATA[</ul>]]></CMS_ARRAY_ELEMENT>
</CMS_ARRAY_PARAM>
</CMS_FUNCTION>
</CMS_HEADER>
$CMS_IF(!nav.isEmpty)$
<ul>
$CMS_VALUE(nav)$
</ul>
$CMS_END_IF$

The example outputs a straightforward navigation list with the selected element highlighted in red.

Example output:

<ul>
<li>
<a href="/fs4preview/preview/671041/site/DE/current/671044/897047">entry_01</a>
</li>
<li>
<a href="/fs4preview/preview/671041/site/DE/current/671044/675058">entry_02</a>
</li>
<li>
<a href="/fs4preview/preview/671041/site/DE/current/671044/897043">entry_03</a>
<ul>
<li>
<a href="/fs4preview/preview/671041/site/DE/current/671044/897049" style="color:#ff0000;">entry_03_01</a>
</li>
<li>
<a href="/fs4preview/preview/671041/site/DE/current/671044/897050">entry_03_02</a>
</li>
</ul>
</li>
</ul>

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.7 | Data privacy