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

Display ALL pages of a specific level

Started by Muut Archive 10 years ago · 2 replies · 347 views
10 years ago

Hi,

I already know that there is a possibility to create a page collection based on the siblings (all pages of the same level excluding the page itself).

but is there a possibility to create a collection with ALL pages of a specific level? i mean, self + siblings?

10 years ago

You can just get the parent, then get the children of that parent.

TWIG
{% for child in page.parent.children %}
...
10 years ago

mhkay thx :)

should really spend some time learning twig :)

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1366 9 years ago
Archive · by Muut Archive, 9 years ago
2 940 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2960 9 years ago
Archive · by Muut Archive, 9 years ago
3 1125 9 years ago