Upgrading secondary navigation that displays consecutive labels

The secondary navigation is dynamic, and shows only two levels of navigation at a time. When a page on the last level of navigation is selected, only that level of navigation is displayed. It is possible to select a page where both the parent level of navigation and the grandparent level of navigation are both labels. In this case, the sibling navigation for the parent level is not accessible.

About this task

The preferred approach to address this type of navigation hierarchy is to use side navigation. For more information, see Side navigation.

An alternative solution is to remove the dynamic ability of the navigation. To remove the dynamic ability, complete the following these steps:

Procedure

  1. Locate the navigation.jsp within your custom theme EAR file.
  2. Within the navigation.jsp, remove the following snippet of code:
    <c:if test="${(selectionPathLength > startLevel+1) && !(empty param.levelsDisplayed)}">
      <c:set var="startLevel" value="${selectionPathLength - param.levelsDisplayed}"/>	
      <c:set var="endLevel" value="${selectionPathLength}"/> 
    </c:if>
  3. Go to the 80theme_secondaryNav dynamic spot at WAS Resource Environment > Resource environment providers > WP DynamicContentSpotMappings > Custom properties > 80theme_secondaryNav.
  4. Increase the levelsDisplayed parameter to the number of levels required to display the full page hierarchy of labels that are consecutive plus any child navigation. For example, if you have two labels that are consecutive and two more levels of child navigation, increase the levelsDisplayed parameter to 4.

    The default value for the 80theme_secondaryNav dynamic spot is: mvc:res:/wps/defaultTheme80/themes/html/dynamicSpots/navigation.jsp?rootClass=wpthemeSecondaryNav&startLevel=2&levelsDisplayed=2,smartphone@,tablet@

  5. Restart your portal server to apply the changes.