Breakdown url with twig

Hello,

This is my dir-structure

site.be/be/province/city/local

On the ‘local’-pages, i want a link to the related city (parent) page:
{{ page.parent.url }} result => …/be/province/city THIS WORKS!

Trying the same adding a link to the related province (grand parent) page, but with no luck.

Reading the docs about routing , but can’t find a good solution with a twig.
Someone can help me out with this?

I’d assume {{ page.parent.parent.url }} should work :thinking: Doesn’t it?

1 Like

@Karmalakas thanks a lot. works perfect!!!
So easy :smiley: