Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

Antimatter navigation

Solved by Paul Hibbitts View solution

Started by Nico Petri 9 years ago · 2 replies · 1163 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 Pedro M, 2 months ago
4 193 2 months ago
Themes & Styling · by Ian, 2 months ago
3 91 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 451 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 45 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 125 3 months ago