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 →

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

Started by Roy Ketelaar 8 years ago · 1 replies · 895 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 TomW, 2 weeks ago
8 228 10 hours ago
Support · by alex, 2 months ago
8 667 1 day ago
Support · by Supple, 5 days ago
1 98 1 day ago
Support · by TomW, 1 week ago
3 160 3 days ago
Support · by TomW, 6 days ago
2 106 6 days ago