#
stuart.ladd
I wanted to be able to highlight the parent elements of submenus. Can't pattern match parents in CSS based on their children's profile. Current menu only supplies the "a.selected" class to the menunode you're currently looking at. I added the following lines into the HeierarchicalMenu.ascx.cs in the BuildListItemFromNode(Node) method below where it has the "//Dirty little trick to highlight the active item :)".
It just attaches the "open" class to anything with a submenu open which isn't the root node (since the root node is usually the home page. Can be ignored safely (since it just gives an extra CSS class).
Sorry, couldn't see where to submit source changes.
Stu
P.S. Cuyahoga so much easier than DNN!
//Stu's dirty little trick to highlight the open items
if (node.Level <= this._page.ActiveNode.Level
&& node.Id == this._page.ActiveNode.Trail[node.Level]
&& node.ChildNodes.Count > 0
&& node !=this._page.RootNode)
{ hpl.CssClass += " open";
}It just attaches the "open" class to anything with a submenu open which isn't the root node (since the root node is usually the home page. Can be ignored safely (since it just gives an extra CSS class).
Sorry, couldn't see where to submit source changes.
Stu
P.S. Cuyahoga so much easier than DNN!