[pmwiki-users] Conditional Extensions

Martin Fick fick at fgm.com
Thu Sep 15 16:22:13 CDT 2005

Has there been any thought to creating conditional
extensions that would include == and != ?

I know that for most conditions this is not needed since a
conditions typically imply ==.  But, I am working on an
extension which would create many new variables and did not
think it very elegant to have to create a condition for
each one of these variables? i.e.

A few variables I will create --  conditions needed

{$PageList.Name}                  pagelist.name
{$PageList.Group}                 pagelist.group
{$PageList.PageCount}             pagelist.pagecount

I have about ten of these.

It would seem much more elegant to simply create the variables
on the right and then to use a condition such as

(:if {$PageList.Group} == Photos :)

instead of 

(:if pagelist.group Photos :)

I realixe this is not the pmwiki way; is that because it is
considered too complicated, or somehow open to abuse?

Does anyone have any thoughts on this?

Also any thoughts on ways to nest conditions?


PS.  In case anyone is interested, I am in the process of
creating a pagelist templating cookbook which allows the
output of a pagelist to be controlled by a wikipage
template.  It works great so far, I will upload after this
issue is a little more clear to me.

More information about the pmwiki-users mailing list