[pmwiki-users] Don't display "edit this page"

Randy Brown randy at brownragfilms.com
Wed Jan 7 21:48:03 CST 2009

The easy way is to use conditional code such as (:if auth edit:)

Unfortunately, "(:if auth edit:)" only tells you if the current user  
is authorized to edit the page. Since you said the admin can edit, it  
won't tell the admin if the page is editable by normal users.

If you want to show the admin how a page is configured for a normal  
user, you would need to look at the edit password attribute on the page.

For example if you have MarkupExprPlus installed, you might be able to  
use this markup:

{(if (test equal "@nopass" (substr "{*$PasswdEdit}" 0 7)) Editable;)}

to show "Editable" if the first 7 characters in the edit attribute is  
"@nopass". (I haven't tried it for edit - but it worked for me with  

What you'd test for in the attribute, of course, depends on how you  
have set up your attributes.


On Jan 7, 2009, at 9:09 PM, kevin wrote:
> I would like to do a little programming so that pages that can be  
> edited by any user display "edit this page" and pages that have been  
> locked for editing to all but the admin to display "this page locked  
> for editing".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090107/a5d14a5c/attachment.html 

More information about the pmwiki-users mailing list