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 →

Display ALL pages of a specific level

Started by Muut Archive 11 years ago · 2 replies · 463 views
11 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?

11 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 Muut Archive, 10 years ago
1 676 1 week ago
Archive · by Deleted User, 9 years ago
0 3043 9 years ago
Archive · by Muut Archive, 9 years ago
2 1983 9 years ago
Archive · by Muut Archive, 9 years ago
2 5338 9 years ago
Archive · by Muut Archive, 9 years ago
1 4135 9 years ago