[pmwiki-users] skin design and the searchbox
Dominique Faure
dominique.faure.1 at free.fr
Tue Mar 22 00:57:43 CST 2005
At Monday, March 21, 2005 9:10 PM [GMT+1=CET], Hans wrote:
> Monday, March 21, 2005, 3:31:28 PM, Patrick wrote:
> > The 'true' and 'false' conditionals don't use their arguments;
> > they always return true and false respectively.
>
> What use are they if they have no argument to test for?
>
> What I would like in the core is this conditional:
>
> (:if true VARIABLE:) .... (:if:)
>
Why not directly:
(:if VARIABLE:) .... (:if:)
and let php decide what is true or false?
So, you only have to define a new condition as php code into your config.php
or in a new cookbook recipe to catch the variable name and evaluate it:
$Conditions['var'] = 'true==$GLOBALS[\'$condparm\']';
You may test it with:
(:if var VARNAME:) ... (:if:)
NB: This code is *untested*
Regards,
Dominique
More information about the pmwiki-users
mailing list