Show TOC

Creating a Detailed Navigation iViewLocate this document in the navigation structure

Use

The code sample below creates a detailed navigation iView starting from the third level of navigation by performing the following steps:

  1. Starts an iteration through the child nodes of the selected node on the third level of navigation.

  2. In the first iteration pass, renders the Detailed Navigation title and opens the topmost <ul> tag, which is closed in the last iteration pass.

  3. Starts a recursive iteration through all child nodes of each node on the third level, displaying an appropriate HTML for each node

    The navigation method is byURL, which means that each link is rendered with the navigation URLs in the href attribute of the link. If a node has a quick link or a quick link path, the quick link or path is used in the navigation URL.

  4. Stops the recursion for the folder nodes that are not in the selected path, and for nodes that are navigation zoom points.

  5. Renders a new, nested <ul> tag when increasing the recursion depth.

  6. Closes the corresponding <li> and <ul> tags when decreasing the recursion depth.

            <%@ taglib uri="NavigationTagLibrary" prefix="nav"%>

<nav:iterateSelectedNavNodesLevel level="3">
    <nav:ifIsFirstIteration>
        <h3>Detailed Navigation</h3>
        <ul>
    </nav:ifIsFirstIteration>
    <nav:recurseNavNodeChildren>
        <li>        
        <nav:ifNotNavNodeIsNavZoom>
            <nav:ifNavNodeInSelectedPath>
                <nav:navNodeAnchor 
                    navigationMethod="byURL" 
                    useQuickLink="true"
                    anchorAttributes="class=\"selected\""/>
                </nav:ifNavNodeInSelectedPath>
            <nav:ifNotNavNodeInSelectedPath>
                <nav:navNodeAnchor 
                    navigationMethod="byURL" 
                    useQuickLink="true"/>
                <nav:doNotRecurseNavNodeChildren/>
            </nav:ifNotNavNodeInSelectedPath>
        </nav:ifNotNavNodeIsNavZoom>
        <nav:ifNavNodeIsNavZoom>
            <nav:navZoomAnchor/>
            <nav:doNotRecurseNavNodeChildren/>
        </nav:ifNavNodeIsNavZoom>
        <nav:ifNextRecursionDepthWillNotChange>
            </li>
        </nav:ifNextRecursionDepthWillNotChange>
        <nav:ifNextRecursionDepthWillIncrease>
            <ul>
        </nav:ifNextRecursionDepthWillIncrease>
        <nav:ifNextRecursionDepthWillDecrease>
            </li>
            <nav:decreaseRecursionDepthLoop>
                </ul></li>
            </nav:decreaseRecursionDepthLoop>
        </nav:ifNextRecursionDepthWillDecrease>
    </nav:recurseNavNodeChildren>
    <nav:ifNotHasMoreIterations>
        </ul>
    </nav:ifNotHasMoreIterations>
</nav:iterateSelectedNavNodesLevel>