Show TOC

Background documentationiterateNavNodeChildren Locate this document in the navigation structure

 

Iterates through the children of the current navigation node.

During each iteration of the tag, a different node is exposed in the body of the tag, either via a cooperating tag that accesses the current node in the iteration or the scriptlet variable defined by the currentNavNode attribute.

Attributes

Name

Mandatory

Description

currentLevel

No

The name of the Java variable to create for holding a Byte object for the current level of navigation in which the iteration is performed.

The variable is accessible in scriptlets in the body of the tag.

currentNavNode

No

The name of the Java variable to create for holding the INavigationNode object for the current node in the iteration.

The variable is accessible in scriptlets in the body of the tag.

direction

No

Indicates in what direction to iterate. The attribute can have the following values:

  • forward (default): Iterate from the first to the last node.

  • backward: Iterate from the last to the first node.

Variables

Name

Scope

Description

<currentLevel> attribute

Body of tag

A Byte object representing the current level of navigation in which the iteration is performed.

<currentNavNode> attribute

Body of tag

A INavigationNode object representing the current node in the iteration.

Cooperating Tags

The tag must be nested in one of the following tags:

  • contextNavNode

  • iterateInitialNavNodes

  • iterateNavNodeChildren

  • iterateNavNodesInSelectedPath

  • iterateSelectedNavNodesLevel

  • launchedNavNode

  • navNode

  • navNodeParent

  • recallNavNode

  • recurseNavNodeChildren

  • selectedNavNode

Example

The following recalls a navigation node (for example, the top-level node that was selected by the user) and iterates through the node's children.

For more information on recalling a node, see recallNavNode.

Syntax Syntax

  1. <nav:recallNavNode>
        <nav:ifNavNodeHasChildren>
            <ul>
            <nav:iterateNavNodeChildren>
                <nav:ifNavNodeInSelectedPath>
                    <li class="selectedLevel2">
                        <nav:navNodeAnchor navigationMethod="byURL"/>
                    </li>
                </nav:ifNavNodeInSelectedPath>
                <nav:ifNotNavNodeInSelectedPath>
                    <li class="unselectedLevel2">
                        <nav:navNodeAnchor navigationMethod="byURL"/>
                    </li>
                </nav:ifNotNavNodeInSelectedPath>
            </nav:iterateNavNodeChildren>
            </ul>
        </nav:ifNavNodeHasChildren>
    </nav:recallNavNode>
    
End of the code.