[pmwiki-users] page text variables and conditionals

adam overton a at plus1plus1plus.org
Thu May 1 12:58:22 CDT 2008


great. i will check this out.
thanks for the speedy response!!
adam


On 1 May 2008, at 10:35 AM, Hans wrote:

> Thursday, May 1, 2008, 5:58:29 PM, adam overton wrote:
>
>> has anyone yet figured out an ingenious workaround for passing page
>> text variables thru conditionals?
>> the help page says they are oblivious to them, so something like the
>> following doesn't work:
>
>> (:if true:)
>> (:anchor:true:)
>> (:else:)
>> (:anchor:othertrue:)
>> (:ifend:)
>
> {$:anchor} -->> always prints 'othertrue'
>
> Defining a variable with two values seems rather an unusual way to try
> to use it, and obviously it is not working. Only the first PTV of
> same name will be recognised by PmWiki.
>
> More logical to me seems to use something like
>
> (:anchor1:foo:)
> (:anchor2:bar:)
> (:if condition...:){$:anchor1}
> (:else:){$:anchor2}
> (:ifend:)
>
>
>   ~Hans
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20080501/2622f658/attachment.html 


More information about the pmwiki-users mailing list