I am trying to create an edit this page link for clients who find it easier to navigate through the site, and find what they want to edit rather than going through the admin interface.
I tried snipping some code from the blog module which has the ability to do so, but it just takes me to the parent page rather than any sort of edit page.
In the page.php I have added the function...
function EditURL(){
return $this->getParent()->Link('post')."/".$this->ID."/";
}
under-> class Page extends SiteTree {
Then had the following code in the template
<% if CurrentMember %><p><a href="$EditURL" id="editpost" title="Edit this page">Edit this page</a> | <a href="$Link(unpublishPost)" id="unpublishpost">Unpublish this page</a></p><% end_if %>
What do I seem to be missing?