[Zope] Maintaining passing the same dtml-var through several dtml docs

Dieter Maurer dieter@handshake.de
Thu, 27 Jun 2002 19:55:34 +0200

McDonnell, Larry writes:
 > .... passing values between requests ....
 > I have read Dieter's Chap 3 section (very good stuff) and it
 > tells me the object is probably empty.
It does not say this. Instead, it says something like:

   A new REQUEST object is created for each new Web request.
   It does not know anything about the content of previous
   REQUEST objects.

The easy way to pass values around requests are session objects
(see Zope Book).

  There is a caveat: they do not play well
  with the browser history. Thus, visitors may get confused when
  they use "back in history/forward in history".

The more painful way are hidden variables (for forms)
or URL parameters (for links).

 > Again, I know I have a syntax error.
 > This is the text that insert the data:
 > <form>
 > <body bgcolor="#FFFFFF" text="#000000">
 > <p><a href="add_part_num">Back to Create Part Number Page</a></p>
 > <dtml-call "REQUEST.set('part_num',st1+st2+st3+st4+st5+st6+st7)"> 
 > <p><dtml-var part_num> This is the new part number created.
 > <dtml-call expr="create_part_num(REQUEST)">
 > <p><a href="part_number_form">Fill out Part Number Information</a></p>
 > </form>
Hmmm. I cannot see a syntax error. At least, not a DTML/Python one (
the HTML is invalid: "body" cannot occur inside "form").