Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Breakdown url with twig

theme

Solved by Karmalakas View solution

Started by Christophe 5 years ago · 2 replies · 570 views
5 years ago

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?

5 years ago Solution

I'd assume {{ page.parent.parent.url }} should work 🤔 Doesn't it?

👍 1
5 years ago

@Karmalakas thanks a lot. works perfect!!!
So easy 😃

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 64 17 hours ago
Support · by Anna, 3 days ago
2 68 20 hours ago
Support · by Justin Young, 21 hours ago
1 35 21 hours ago
Support · by Duc , 1 week ago
2 71 6 days ago
Support · by Colin Hume, 1 week ago
2 63 6 days ago