Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Antimatter navigation

Solved by Paul Hibbitts View solution

Started by Nico Petri 9 years ago · 2 replies · 1578 views
9 years ago

Hello there,

i am just try to figure out how, to build a navigation. There is one thing i dont understand. In the navigation.html.twig of the antimatter theme there is a loop through the page collection like

TWIG
{% for p in page.children.visible %}

And after that, there is a second loop using the site object. Like this one:

TWIG
{% for mitem in site.menu %}

But why is this extra loop needed?

Thanks is advance.

9 years ago

thank u very much. i checked that link and i discovered another great feature of grav ;)

👍 1

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by MarkP, 2 weeks ago
3 191 2 weeks ago
Themes & Styling · by TomW, 2 weeks ago
0 110 2 weeks ago
Themes & Styling · by themetman, 3 weeks ago
1 205 3 weeks ago
Themes & Styling · by AH, 1 month ago
1 323 3 weeks ago
Themes & Styling · by Bruno, 4 years ago
6 1522 3 weeks ago