I'm having difficulties getting a "active" class working in the navigation.
I've got a property of Multinode Treepicker that let's editors pick desired content nodes for the main navigation.
Now in the navigation template I'm using activeNode = linkNode.IsAncestorOrSelf(currentPage) ? "active" : null; in order to set a "active" CSS class of the link node. This works good if the current page is itself or a descendent of the node in the Multinode Treepicker. But if the current page is a sibling I'm having trouble geting the "active" status working.
So in the image the "Node 2.2" is in fact a sibling of "Node 2". How can I set the "active" class on the "Node 2" if current page is "Node 2.2", a sibling.
Active CSS class in navigation
Hi,
I'm having difficulties getting a "active" class working in the navigation.
I've got a property of Multinode Treepicker that let's editors pick desired content nodes for the main navigation.
Now in the navigation template I'm using
activeNode = linkNode.IsAncestorOrSelf(currentPage) ? "active" : null;
in order to set a "active" CSS class of the link node. This works good if the current page is itself or a descendent of the node in the Multinode Treepicker. But if the current page is a sibling I'm having trouble geting the "active" status working.So in the image the "Node 2.2" is in fact a sibling of "Node 2". How can I set the "active" class on the "Node 2" if current page is "Node 2.2", a sibling.
is working on a reply...