[pmwiki-users] conditional markup 'else' issue
Patrick R. Michaud
pmichaud at pobox.com
Sun Jun 10 13:11:51 CDT 2007
On Sun, Jun 10, 2007 at 01:01:18PM -0500, Doug Johnson wrote:
> How about
>
> (:if !(author user1 or author user2) :)
>
> or just more parens
>
> (:if ((! author user1) && (! author user2)) :)
In order for complex conditionals to work, the word "expr" or an
opening square bracket must appear at the beginning, and all
operators such as parentheses, !, and && require spaces around them.
(:if expr ! author user1 && ! author user 2 :)
Pm
> info at hassanein.ch wrote:
> I use the following markup in a page.
> The last :if markup does not work, I need to do someting if user is
> not user1 and not user2.
> There is no :else markup therefore I used the not operator but it does
> not work in conjunction with the && operator.
>
> Any idea how I can achieve that?
>
> (:if author user1 :)
> text for user1
> (:ifend:)
>
> (:if author user1 :)
> text for user2
> (:ifend:)
>
> (:if !author user1 && !author user2 :)
> text for all other users, but not for user1 and user2
> (:ifend:)
More information about the pmwiki-users
mailing list