-
Bug
-
Resolution: Fixed
-
Major
-
2.7
-
None
-
-
Yes
-
Empty show more show less
The method createVerticalNavigation() correctly checks the start level, but the method isShowVerticalNavigation() does not. Affecting everything that uses the vertical navigation.
public boolean isShowVerticalNavigation() { try { if(isShowHorizontalNavigation() && siteRoot.getDepth() + this.getHorizontalLevel() > currentNode.getDepth() ){ return false; } final boolean enabled = siteNavigation.getVertical().getEnabled(); final boolean empty = createVerticalNavigation().getItems().isEmpty(); return enabled && !empty; } catch (RepositoryException e) { log.error("Can't check existence of vertical navigation",e); return false; } }
Should be something like:
public boolean isShowVerticalNavigation() { int startlevel = siteNavigation.getVertical().getStartLevel() > 0 ? siteNavigation.getVertical().getStartLevel() : startLevel + getHorizontalLevel(); try { if(isShowHorizontalNavigation() && siteRoot.getDepth() + startLevel > currentNode.getDepth() ){ return false; } final boolean enabled = siteNavigation.getVertical().getEnabled(); final boolean empty = createVerticalNavigation().getItems().isEmpty(); return enabled && !empty; } catch (RepositoryException e) { log.error("Can't check existence of vertical navigation",e); return false; } }
Acceptance criteria
- relates to
-
MGNLSTK-1178 Start level of subnavigation not correct for sites with home not on top level
- Closed