amnav icon indicating copy to clipboard operation
amnav copied to clipboard

Make parent 'active' but only on the structure the current node is on.

Open johnniefp opened this issue 9 years ago • 3 comments

Hello Hubert,

Any idea how I could change your published macro 'addNodeToNavigation' to only make the current structures parent active.

I have child entries that repeat through my menu and it's leading to multiple active classes.

It's leading to things like this: (purple have class of 'active') bar

(effectively : does amnav give me a way of the parent menu item knowing it has a specific child that's 'current' for that parent node only so as not to trigger multiple 'active' classes.)

Thanks John

johnniefp avatar Jul 16 '16 16:07 johnniefp

We also have the same issue on several projects. Would love to see another example of this. Maybe some other tags we can use that are not mentioned in the docs / Github?

bonzidrine avatar Feb 14 '17 12:02 bonzidrine

+1 for this.

terryupton avatar Mar 10 '17 17:03 terryupton

+1 for this.

It may help you if I explain my situation, I have the following menu:

screen shot 2017-03-16 at 17 35 31

If I navigate to any child of Services, the child takes the active class but the parent doesn't. However if I navigate to a page which is under Learn, both Learn and the child take on the active class. As you see, children of Learn have different URL structures to the more simple services/moderation for example.

Thanks so much for a fantastic plugin.

admench avatar Mar 16 '17 17:03 admench