Skip to main content
5 events
when toggle format what by license comment
Feb 29 at 16:29 comment added Dario Zadro Very nice. I need something similar with Craft 4, and your example really helped. Thank you!
Dec 18, 2018 at 15:20 comment added mateostabio @Adam, It is exactly that. I wanted to be able to control everything with CSS. Now I have a way to show the parent/children of whatever page is active. Remember this is a side navigation so I wanted to be able to let the user expand and collapse navigation, similar to the craftcms.com/features/all And yes, the first if statement checks to see if it has children, and if it does not, it doesn't put class .Navigation-item--dropdown on the parent <li> and doesn't put a <ul> submenu in it.
Dec 17, 2018 at 23:24 comment added Adam This is interesting. Is this code designed to hide the subnav unless the parent item has child pages? Example: if a parent page with no children is active, will the child pages of another show even though that page is not active?
Dec 17, 2018 at 21:44 vote accept mateostabio
Dec 17, 2018 at 21:43 history answered mateostabio CC BY-SA 4.0