[pmwiki-users] Method to selectively include template markup based on auth level
Mr Wappy
mrwappy at yahoo.co.uk
Fri Sep 2 11:53:04 CDT 2005
Hello
I have been using a skin which has tabs for view,
edit, attr etc which are displayed all the time. I
have been trying to determine how I could selectively
display them based on the current users permissions.
I am using authuser for the authentication.
I have within the template list items that represent
the tabs and would like to conditionally include them
e.g. something like
<:if auth edit:>
<li id='edit'><a
href='$PageUrl?action=edit'>$[edit]</a></li>
<:f auth ...
clearly the syntax does not work for this so I tried
with a function
I started with a function to generate the list item
with appropriate fields
<--function:Tabinc $PageUrl $[edit] $[EDIT] -->
but it's not clear to me how I can either
i) conditionally include this function within the
syntax provided within a template
or
ii) identify programmatically, within my function that
I have placed in config.php, the auth level of the
current user.
Can anybody provide some more information that would
help me with this task?
Many thanks
Adrian
___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
More information about the pmwiki-users
mailing list