[pmwiki-users] Method to selectively include template markup based on auth level
Waylan Limberg
waylan at gmail.com
Fri Sep 2 12:53:00 CDT 2005
> Notice that the (:if ...:) causes the "Attach" link to be displayed
> only if the visitor is currently authorized to upload attachments.
> In the skin template, we simply do:
>
> <!--wiki:$SiteGroup.PageActions-->
>
> which includes the above page, and then use CSS to style the list
> into tabs.
>
> More generally, one could use:
>
> (:if auth read:)
> * %item class=browse% [[{$FullName} | View]]
> (:if auth edit:)
> * %item class=edit% [[{$FullName}?action=edit | Edit]]
> * %item class=history% [[{$FullName}?action=diff | History]]
> (:if auth upload:)
> * %item class=upload% [[{$FullName}?action=upload | Attach]]
> (:if auth read:)
> * %item class=print% [[{$FullName}?action=print | Print]]
> (:ifend:)
>
All this Site.PageActions stuff is nice. Would have saved me a little
trouble the past couple days. I have not come acrossed anything about
it in the wiki. It this documented anywhere?
--
----
Waylan Limberg
waylan at gmail.com
More information about the pmwiki-users
mailing list