Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

[Twig] If statement to check if page is a subpage

Started by Roy Ketelaar 8 years ago · 1 replies · 831 views
8 years ago

Hi there,

Does someone know what kind of if-statement I need to write to check if the current page is a child page?

8 years ago

You could check by if page.parent() != false.

Suggested topics

Topic Participants Replies Views Activity
Support · by webmasterodp, 1 week ago
4 157 6 days ago
Support · by nwhitfield, 1 week ago
2 136 1 week ago
Support · by stell, 3 weeks ago
5 369 2 weeks ago
Support · by gravinator, 1 month ago
5 559 2 weeks ago
Support · by Gravver, 3 weeks ago
6 347 3 weeks ago