[pmwiki-users] no ifs, ands, buts, or else ...
Patrick R. Michaud
pmichaud at pobox.com
Thu Mar 23 14:48:48 CST 2006
On Thu, Mar 23, 2006 at 03:37:39PM -0500, Neil Herber wrote:
> Do my eyes deceive me?
> ... or is there really no (:else if:) or (:else:) construct? It looks
> like the (:if:) as implemented is a variation of the SSI show and
> hide directives (though not implemented that way).
There's currently no (:else if:) or (:else:) construct. Part of the
reason is that having one would make people expect nested if's.
> It is a pain to have to write
> (:if cond-a:) show a
> (:if cond-b:) show b
> (:if cond-c:) show c
> (:if cond-d:) show d
> (:if expr !cond-a or !cond-b or !cond-c or !cond-d:) show something else
Are cond-a, cond-b, cond-c, cond-d mutually exclusive above?
Or did you really mean to "show something else" if any of
a, b, c, or d aren't true? (This isn't how I would expect an
"else" to work.)
Or, put another way -- how would you write the above assuming
you did have (:else:) and/or (:elseif:)?
More information about the pmwiki-users