[Zope] NEWBIE: assignment in DTML

Stephen Pitts smpitts@midsouth.rr.com
Tue, 15 Feb 2000 16:17:36 -0600


On Tue, Feb 15, 2000 at 06:40:13PM +0100, Michiel Toneman wrote:
> 
> 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 :(
> 

Try: <dtml-call "REQUEST.set('authorize, 1)">
-- 
Stephen Pitts
smpitts@midsouth.rr.com
webmaster - http://www.mschess.org