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.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

$URLsegment and nested urls

Go to End

2 Posts   2176 Views


Community Member, 203 Posts

26 April 2010 at 10:46am

(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 instead of

Any advice on how to make that work? Can I create a link based on the id of a page?


Community Member, 203 Posts

27 April 2010 at 3:49am