[pmwiki-users] Hiding actions in template

Kathryn Andersen kat_lists at katspace.homelinux.org
Wed Jul 18 07:26:16 CDT 2007

On Wed, Jul 18, 2007 at 02:29:27PM +0300, Athan Dimoy wrote:
> I want to hide action list for all users except those with edit or admin 
> rights.
> Any idea how this can be done in a skin template (not using markup but php)?

Why do you need to put it in the skin template?
It's much easier to just edit the markup in Site.PageActions to test
whether the user has edit rights.

In the Bonny Skin, I got around the problem by making a
Site.PageActionsCMS page which does the testing, and include PageActions
if so.

(:if auth edit:)
(:include {$SiteGroup}.PageActions:)

And then including PageActionsCMS in preference to PageActions in the
template itself.

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