Open tyssen opened 5 years ago
Hi @tyssen . Apologies I missed this.
Is your Services in the GUI a ProcessWire page or a Custom menu item?
In my tests I did both; i.e., Services as a ProcessWire page BUT NOT a ProcessWire parent of Service 1 and Service 2; and Services as a Custom menu item. The following were the results.
current_class_level of 2 and 3 work for me for both Services and Blog. 0 only works for Blog BUT NOT for Services. This means 0 only work for natural/ProcessWire parents of child menu items but not for MB-only (GUI) parents.
I'll look into this ASAP.
Thanks.
I can't actually remember which project this was now. I think I may have ended up doing something with a different body class per page and then targetting each top level link that way.
Thanks for responding. Glad you sorted it some other way. I'll keep this issue open until I find a solution.
Thanks.
I have a menu builder menu as follows:
The service sub pages aren't actually child pages of Services in the PW tree but they're nested under Services in Menu Builder. Blog is a parent page of numerous child blog entries in the PW tree.
The actual PW tree looks like this:
I don't seem to be able to find a value for
current_class_level
which will show the current class for both Services and Blog when you're on a subpage of that section.If I set it to 0, I get the class on Blog when you're on a child blog page, but not on Services when you click on one of the dropdown menu items. And if I set it to 2 or 3, it's the opposite, current class is on Services but not on Blog.
Is there any way I can do both?