Thread tagged as: Runway

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 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:

          'navgroup' =>'themesnav',
          'from-path' => '/lorem',
          'template' => array('level1-dropdown-triggers.html'),

But after having fiddled around a little without immediate success, I read 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().

Urs Bräm

Urs Bräm 1 points

  • 5 years ago

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:

<perch:if id="perch_item_index" value="5" match="lt">

... don't reply, better idea coming up


In the page attributes:

<perch:pages id="themesNav" type="checkbox" label="Gehört zu Themen-Navigation" value="true" suppress="true" divider-before="Custom Navigation Groups"/>

And in the navigation template:

<perch:if exists="themesNav">

--- that's it!

By the way: <perch:showall /> is awesome

Drew McLellan

Drew McLellan 2638 points
Perch Support

All solved?

Yep :-)