Breakdown url with twig


This is my dir-structure

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: