[Zope] dtml-if fustration!

Ausum Studio ausum_studio@hotmail.com
Sat, 24 Aug 2002 12:39:09 -0500


What is the "next pass"?. Do you mean within the same page?
If so, you don't need to declare the variable, as long as it's been already
defined for the whole page. Just use <dtml-var SelectSID> anywhere.

Now, if you need to change its value, and then use it on the remaining
portion on the rendered page, the anwser is the same, use <dtml-var
SelectSID>. You don't need to use the "REQUEST.SelectSID" part.


Ausum


----- Original Message -----
From: "Greg Conway" <greg@gmlnt.com>
To: "Zope@Zope. Org" <zope@zope.org>
Sent: Saturday, August 24, 2002 11:56 AM
Subject: [Zope] dtml-if fustration!


> Hi all,
>
> I have a fustrating problem with dtml-if's!! I've tried to work round it
in
> many ways, but there is probably an easy one I am overlooking knowing my
> luck...
>
> Anyway... Consider the following dtml-if statement:
>
>     <dtml-if SelectSID>
>       SelectSID = <dtml-var SelectSID>
>       <dtml-call "REQUEST.set('SelectSID', SelectSID)">
>     </dtml-if>
>
> This works okay, and stores the variable SelectSID in the request for the
> code to pick up again on it's next pass.
>
> However, on the next pass, the variable SelectSID doesn't exist! As the
> variable is now REQUEST.SelectSID - and the following code doesn't
work....
>
>     <dtml-if "REQUEST.SelectSID">
>       SelectSID = <dtml-var SelectSID>
>       <dtml-call "REQUEST.set('SelectSID', REQUEST.SelectSID)">
>     </dtml-if>
>
> ...as an error is thrown up if REQUEST.SelectSID doesn't exist!
>
> Anybody got a simple answer to my dilemma?!!
>
> Many thanks for any help!
>
> Regards,
>
> Greg Conway.
>
> This electronic transmission and any files attached to it are strictly
> confidential and intended solely for the addressee. If you are not
> the intended addressee, you must not disclose, copy or take any action
> in reliance of this transmission. If you have received this
> transmission in error, please notify us by return and delete the same.
> Further enquiries/returns can be posted to postmaster@gmlnt.com
> Thank you.
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>