[pmwiki-users] Conditional Extensions
Russell Bailey
russell-pmwiki at saberpunk.net
Thu Sep 15 16:25:46 CDT 2005
I believe that you can test for any condition by preceding it with a !.
Martin Fick wrote:
>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?
>
>-Martin
>
>
>
>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.
>
>_______________________________________________
>pmwiki-users mailing list
>pmwiki-users at pmichaud.com
>http://host.pmichaud.com/mailman/listinfo/pmwiki-users
>
>
More information about the pmwiki-users
mailing list