[pmwiki-users] question about conditional markup
Maria McKinley
parody at u.washington.edu
Tue Oct 23 20:05:28 CDT 2007
Hi there,
Can I do an if statement within and if statement? Here is what I would
like to do:
(:if auth edit:)
* %item class=browse
accesskey='$[ak_view]'%[[{*$FullName} | $[View] ]]
* %item rel=nofollow class=edit
accesskey='$[ak_edit]'%[[{*$FullName}?action=edit | $[Edit] ]]
* %item rel=nofollow class=diff
accesskey='$[ak_history]'%[[{*$FullName}?action=diff | $[Recent
Changes] ]]
* %item rel=nofollow class=upload
accesskey='$[ak_attach]'%[[{*$FullName}?action=upload | $[Attach] ]]
* %item rel=nofollow class=logout
accesskey='$[ak_logout]'%[[{*$FullName}?action=logout | $[Logout] ]]
(:else:)
* %item class=white% [[{$FullName}?action=login|Login]]
(:if name Main.Info:)
* %item rel=nofollow class=upload
accesskey='$[ak_attach]'%[[{*$FullName}?action=upload | $[Attach] ]]
(:ifend:)
(:ifend:)
So, if people are authorized to edit, they can see the attach button
always, but if they are not, then they only see the attach button on a
certain page. This doesn't work (I see two attach buttons when logged
in and on the page Main.Info), and I am wondering if it is because my
syntax is bad, or if you just can't do what I am trying to do.
thanks,
maria
More information about the pmwiki-users
mailing list