[pmwiki-users] question about conditional markup

Jon Haupt jhaupt at gmail.com
Tue Oct 23 22:19:01 CDT 2007


On 10/23/07, Maria McKinley <parody at u.washington.edu> wrote:
> Hi there,
>
> Can I do an if statement within and if statement? Here is what I would
> like to do:

You can't nest if statements, so what you'll have to do is:

(: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] ]]
(:if ! auth edit:)
* %item class=white% [[{$FullName}?action=login|Login]]
(:if expr name Main.Info && ! auth edit:)
* %item rel=nofollow class=upload
accesskey='$[ak_attach]'%[[{*$FullName}?action=upload | $[Attach] ]]
(:ifend:)

I _think_ that will work...

Jon Haupt



More information about the pmwiki-users mailing list