Search the Community
Showing results for tags 'editable()'.
-
Hi there, we all use this: <?php // If the page is editable, then output a link that takes us straight to the page edit screen: if($page->editable()) { echo "<a class='nav' id='editpage' href='{$config->urls->admin}page/edit/?id={$page->id}'>Edit</a>"; } ?> Unfortunately, I always see the edit link, even if I'm logged out... Very strange...recently I switched from test mode in a sub-domain (new.mysite.com) to production mode (www.mysite.com). Could this be an issue?
-
In the API section of PW website I found a comment made by Apeisa. He wrote: // If the page is editable, then output a link that takes us straight to the page edit screen: if($page->editable()) { echo "Edit"; } I'd like to use this function but the code shown above won't print a link - just a static string. How to edit this so the output would be a link leading to the exact page edit screen in admin control panel? Thanks. PS. Link to the page where I found the comment: http://processwire.com/api/variables/page/
- 2 replies
-
- editable()
- $page
-
(and 2 more)
Tagged with: