• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

this will always set (or clear) a session attribute:

%IF{"1=1" then="" else="%SESSION_VARIABLE{"name" set="1"}%"}%

you can't use the variable to set a session attribute in an if-statement. i wanted to set or remove a session attribute, if an url-parameter is set or not but failed. later i realized that the condition isn't taken into account.

Correct. This is because variables are evaluated "inside-out-left-right", so the SESSION_VARIABLE is evaluated before the IF is evaluated.

Do this instead:

%SESSION_VARIABLE{"name" set="%IF{"defined urlparam" then="1" else="0"}%"}%



Summary the variable %IF{}% doesn't work with %SESSION_VARIABLE{}%
ReportedBy TWiki:Main.FrankEgger

SVN Range Wed, 12 Apr 2006 build 9798
AppliesTo Engine

Priority Normal
CurrentState No Action Required


TargetRelease n/a
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r4 - 2006-04-21 - CrawfordCurrie
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback