Details
-
Bug
-
Resolution: Cannot Reproduce
-
Minor
-
None
-
2.1 Final
-
None
Description
When displaying the navigation for elements that have children and if all the elements' children are set to hideInNav, an empty ul: <ul class="levelx"></ul> is shown. In CSS drop-down navigation menus, this displays as an empty block, but also it is syntactically incorrect HTML. This is only a problem for elements which are located anywhere in the branch of a selected element. E.g. In the tree
Home
+ Section 1
...
+ Section 2
+ Subsection 2.1
+ Subsection 2.2
+ Page 2.2.1
+ Page 2.2.2
+ Page 2.2.3
+ Subsection 2.3
+ Page 2.3.1
+ Page 2.3.2
+ Page 2.3.3
...
Pages under 2.2 are marked as hideInNav; if Page 2.2.1 is selected so is the currently active page, then an empty ul element is created.
Having looked at the code, I reckon the fix is here (line 249):
if (activePage.getHandle().equals(child.getHandle())) {
// self
// check if child has visible children
if (hasVisibleChildren(child))
self = true;
cssClasses.add("active"); //$NON-NLS-1$
}
It hasn't been tested.
John