[Zope] NEWBIE: assignment in DTML
Thomas Weiner
weiner@tu-harburg.de
Tue, 15 Feb 2000 19:03:56 +0100
Michiel Toneman schrieb:
>
> Hi,
>
> This must be a dumb question, but I can't seem to get to grips
> with the DTML syntax :(
>
> I would like to assign a value 0/1 to a variable "authorize"
> like in the code snippet below
> (allowed_users is a multiple selection property):
>
> ------------------------------------------------------------------
> <dtml-let authorize="0">
>
> <dtml-in allowed_users>
>
> <dtml-if "AUTHENTICATED_USER.getUserName() == _['sequence-item']">
> <dtml-var sequence-item>
> Hello, we are autorized
> <dtml-call "_['authorize']='1'">
> </dtml-if>
>
> </dtml-in>
> </dtml-let>
> ------------------------------------------------------------------
>
> What do I have to do to get authorize = 1? This syntax for
> <dtml-call> doesn't work, but I've tried just about everything :(
<dtml-call "REQUEST.set('authorize',1)"> if authorize should be treated
as integer or <dtml-call "REQUEST.set('authorize','1')"> if authorize
should be treated as a string.
hth,
Thomas
--
fon: ++49 (0)40 42878 3781
fax: ++49 (0)40 42878 2728