[pmwiki-users] Conditional Extensions

Martin Fick fick at fgm.com
Thu Sep 15 16:47:56 CDT 2005


I guess I should clarify a little better.  I was hoping to
be able to write:

  (:if {$Group} == Main:)

instead of:

  (:if group Main:)


While this mau seem futile in the context of {$Group}, it
would be very usefull for any custom defined variables
which might not have a condition associated with them.

-Martin


On Thu, Sep 15, 2005 at 05:25:46PM -0400, Russell Bailey wrote:
> 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
> > 
> >
> 
> 
> _______________________________________________
> 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