Item1733: %PARAMs can't be used in %IFs
Priority: Low
Current State: Confirmed
Released In: n/a
Target Release: n/a
... because they are not added as preference variables. They are substituted into the message as is which is too late in the parsing order for other tags like
%IF
to read them.
Try this:
%IF{
"'%PARAM1%.%PARAM2%'='%TRASHWEB%.TrashAttachment'"
then="this is a DELETE"
else="this is a MOVE"
}%
Doesn't work. I tried to figure out how to fix that and found out that the
%PARAM
values are added to oopses and error messages in quite different places. Confusing. Anybody else a clue?
--
MichaelDaum - 16 Jun 2009
Oh, I got this working using
%IF{
"'%URLPARAM{param1}%.%URLPARAM{param2}%'='%TRASHWEB%.TrashAttachment'"
then="this is a DELETE"
else="this is a MOVE"
}%
Foswiki is so so strange sometimes
--
MichaelDaum - 16 Jun 2009
Isn't this handled with the
%IF{"$ MACRO
syntax, or
%IF{"$ urlparam
? Can we set this to No Action?
--
GeorgeClark - 16 Mar 2011
That does not really matter. The point is that
%IF{...%PARAM...}
isn't parse inside-out-left-to-right because
%PARAMs
are no first class citizens.
--
MichaelDaum - 17 Mar 2011