Get parent page title from a modular template

I’m trying to figure out how to get the parent page title from one of the modular partials. So I have:


I want the file to display the page title of the not the page title of itself. I currently have

{% set patternTitle = page.title %}

set in the header.html.twig, but it only reads from itself ( and not the parent (


It is just as you would expect it to be:

{% set patternTitle = page.parent.title %}


1 Like

Bah. You’re right of course. I’m pretty sure that’s the only thing I hadn’t tried yet. Thanks for the nudge, Grav is my new goto now - love it. :slight_smile: