[pmwiki-users] Conditional extensions

Dominique Faure dominique.faure.1 at free.fr
Wed Apr 20 15:54:22 CDT 2005


At Tuesday, April 19, 2005 2:46 PM [GMT+1=CET], Patrick R. Michaud wrote:

> On Tue, Apr 19, 2005 at 09:11:10AM +0200, Dominique Faure wrote:
> > Hi,
> >
> > Could you please enable the recipe on its own page to make the samples
> > work: http://www.pmwiki.org/wiki/Cookbook/ConditionalExtensions
> > With the new auth condition you provide, it becomes more and more
> > useful and may even be integrated into PmWiki core dist.
>
> Done.  I doubt we'll integrate it into the core distribution because
> the syntax would be too difficult for many authors to understand.
> If PmWiki needs complex conditionals in markup we'll probably support
> infix and/or instead of the prefix version.

Sorry to ask you to update the recipe script again, but I had time to 
seriously update it and give it an infix notation, with the resulting 
SideBar code as example:

Now I'm using following code into my SideBar page:

===8<---
(:if expr auth admin || auth edit || auth attr:)----
%center font-size=smaller% Logged in as ''{$Author}'' with
(:if auth admin:)''admin''
(:if expr auth attr && ! auth admin:)''attr''
(:if expr auth edit && ! auth admin:)''edit''
(:if expr auth admin || auth edit || auth attr:)rights
[=[=][[Logout -> {$Name}?action=logout]][=]=]%%
----
...
(:ifend:)
===8<---

Thanks,
Dom 




More information about the pmwiki-users mailing list