I’m a little stuck here. What I’m trying to create is a menu with 5 items, 4 items should show a submenu (only the direct children) and 1 item (about) should show a filter instead of children().
I tried excluding about by creating “$noabout = $pages->not(‘about’);” and just adding it after the foreach method. This works for the main menu. The submenu should only show the children of clicked menu points so i was using “$page->children()”. But this creates some problems:
It will obviously show the children of subpages and so on. I want to show only page (menu) and children (submenu) but no grandchildren and so on.
It will also show the children of “about”, but I don’t wanna display those (I want to display a filter instead). This makes my taking it out of the foreach loop pointless…
I hope this is somehow understandable, I find it very hard to describe this problem…
Thought so, i’m sorry. I will post code. Info: The main menu items are About, Projects (this is the one with a filter instead submenu), Team, Jobs, Contact
For the main menu I tried:
The problem here is that it also shows the children of the projects page (since it is not excluded) and it also shows children of the children. I want the sub-menu to “stop” with the first children.
I tried:
For the projects I thought about adding a static filter with all the filter options I need but since it is not part of the foreach it is not dynamic.
So the problem is that I want a submenu that will only show the direct children of the main pages and nothing further down the tree and I want one of the elements to display a filter instead of those sub-pages.