11ty/eleventy-navigation

filter navigation only 1 level deep

flowen opened this issue · 1 comments

Thank you for this great plugin first of all.

I wondered if it's possible to only render items 1 level deep of the current level.

My render code:
{{ collections.all | eleventyNavigation(eleventyNavigation.key) | eleventyNavigationToHtml | safe }}

level0
-level1
-level1
--level2
-level1  

So when current navigation is @ level0, I don't want to display level2 or deeper items.

edit:

And if this is possible. Is there a function to navigate a level higher from current level?
Currently using the breadcrumb, but it shows all levels higher.

ah ok so I was thinking (hoping) there would be some functions for this. Instead if you go into the structure one can more specifically render what links to show.