[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Variables and Advanced DTML
webmaster@zope.org
webmaster@zope.org
Tue, 24 Sep 2002 14:32:58 -0400
A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/AdvDTML.stx#3-40
---------------
You've seen this many times throughout the examples in this
book. While the *in* tag is iterating over a sequence, each item
is pushed onto the namespace stack for the duration of the
contents of the in tag block. When the block is finished
executing, the current item in the sequence is popped off the
DTML namespace stack and the next item in the sequence is pushed
on.
% htrd - Apr. 24, 2002 9:03 am:
(Re the changes from http://collector.zope.org/Zope/358 that I am about to merge)
Use the optional "no_push_item" to inhibit "dtml-in" pushing each item onto the stack in this way.
You may want to do this to access names that are already in the DTML namespace, without worrying
about whether the same name is also provided by the objects in the sequence.
% Anonymous User - Sep. 24, 2002 2:32 pm:
More exactly: an iteration object is pushed. This iteration object contains the current object in the
iteration along with a plethora of variables describing the iteration state (sequence-index and the like).