[Zope] Variable setting in 'if' for use outside of 'if'

Shaw, Howard ShawH@STHS.org
Wed, 10 Feb 1999 15:45:25 -0600


Is there any means of setting variables other than 'with'?
As best I can determine, the mechanism for setting variable using 'with'
provides those values only within the 'with' block. 

I would like to preface my html with an if-elif-elif-else block, using
it to set a variable so that a simple if-else test can be used later on.

I would prefer not to have to replicate the full document within each
portion of the if-elif-elif-else block, but I can't find a way to set a
variable in the if-elif-elif-else block that can carry over to the rest
of the document, since Zope considers it an error for a tag to be only
partially contained within a larger block.

Please help.