[pmwiki-users] Conditional markup equal with quotes
The Editor
editor at fast.st
Tue Jun 5 14:11:57 CDT 2007
On 6/5/07, Christophe David <pmwiki at christophedavid.org> wrote:
> Would someone have an idea how to determine if PageTextVar1 is defined
> and/or blank, and possibly how to make the equal succeed ? Without
> the quotes, there is of course no problem.
>
>
> (:PageTextVar1:abc "de" 'fg' hij:)
>
> (:if equal ({$:PageTextVar1}) (abc "de" 'fg' hij) :)
> OK
> (:ifend:)
>
>
> Christophe
I think the parse args function is going to choke on this one as it
needs the quotes to separate the terms, and don't think parenthesis
will do it.
Not sure this is an option in your case, or even sure it will work but
you could try:
(:PageTextVar1:abc "de" 'fg' hij:)
(:Test:abc "de" 'fg' hij:)
(:if equal "{$:PageTextVar1}" "{$:Test}" :)
OK
(:ifend:)
Hope it helps, but I fear you will need to escape the quotes. Maybe a
custom markup expression along these lines:
(:if equal "{(addslashes {$:PageTextVar1})}" "{(addslashes {$:Test})}" :)
Cheers,
Dan
PS. Hopefully someone can come up with something simpler!
More information about the pmwiki-users
mailing list