Forum
Just display certain branches of navigation - inside a global "from-path"
I have some branches of a navigation in runway I should treat individually to build separate menus (main, additional, footer with everything etc).
Not having used navgroups for a long time (as you say on https://docs.grabaperch.com/docs/navigation/navigation-groups/) I thought this might be the use case: I just added the starting pages I wanted to appear in that navigation chunk to a navgroup and treated it like a filter:
perch_pages_navigation([
'navgroup' =>'themesnav',
'from-path' => '/lorem',
'levels'=>1,
'template' => array('level1-dropdown-triggers.html'),
]);
But after having fiddled around a little without immediate success, I read https://forum.grabaperch.com/forum/08-20-2015-attribute-navgroup-in-perch-pages-navigation-nesting-off-subitems and now I think that's just not what navgroups do.
They're more like little extra navigations you can combine manually in /perch/core/apps/content/navigation/, but not like an additional filter for a regular navigation - right?
If so: do you have a clue for me how to add an additional filter for certain navigation branches inside the defined from-path
?
I'd rather not use the "Hide from main navigation" checkbox, as this is used already for pages that shouldn't appear in the navigation at all (like 404). Lender of last resort would be skip-template
and unset().
Better than skip-template - not perfect, but as I know the order of the items I need to exclude and it's quite simple: filter in the template:
... don't reply, better idea coming up
Yessss
In the page attributes:
And in the navigation template:
--- that's it!
By the way: <perch:showall /> is awesome
All solved?
Yep :-)