Skip to main content
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
(Sorry for crossposting, I just responded to a similar question in the Data Model Questions and later realized that template questions was a better place for this.)
I used to use 'Link' => Director::baseURL() . $page->URLSegment to construct an url to translations of a page.
However this does not work with nested urls because you get www.mydomain.com/sub-page/ instead of www.mydomain.com/parent-page/sub-page/
Any advice on how to make that work? Can I create a link based on the id of a page?