[pmwiki-users] Checking permissions in the template?

Kathryn Andersen kat_lists at katspace.homelinux.org
Fri Jun 30 18:33:59 CDT 2006


On Fri, Jun 30, 2006 at 04:56:02PM -0400, Ryan R. Varick wrote:
> Perhaps this is a simple question, but I haven't found a solution yet.
>  Essentially what I want to do is a (:if auth edit:)... at the
> *template* level.  Specifically, I only want the edit link to be
> visible if the user has permission to edit the page.

Hmmm, the approach I took with my skin was to do something like this in
the template:
<!--markup:(:if auth edit:)(:include {$Group}.PageActions {$SiteGroup}.PageActions:)(:if !auth edit:)[[{$FullName}?action=login|Login]](:ifend:)-->

(though I actually used (:if enabled AuthPw:) which checks if they're
logged in)
 
> I see that PmWiki kind of does this by including PageActions.  I tried
> this approach first, but PmWiki wraps the link in <p> tags, which
> breaks the container I need to put this link in.

But, yes the above approach does wrap this in <p> tags, so it probably
won't suit you.
 
Kathryn Andersen
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe




More information about the pmwiki-users mailing list