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.
I was just wondering if there is a nice clean way of getting the URLSegment (or the whole URL) for a page by parsing just the ID of the page? (i'm talking in the Page class
not the template - but to use in the template too)
I know i can do:
But is there a function like:
Any help is much appreciated.
Check the SiteTree.php for any function which gets the url but I doubt it exists. A DataObject::get_by_id() function will work just as easily.
Cheers for the reply,
There only seems to be: