silverstripe-restfulapi
silverstripe-restfulapi copied to clipboard
Getting page path as well as just URLSegment
Would be good if there was a nice way of passing a page full URL to the json. Currently a page returns the URLSegment, but no full path.
You can do that via a DataExtension on your DataObject/Page and take advantage of the onBeforeSerialize to add an extra field with the Link() value of the page.
I'll try to put an example together when I have a minute.