The with tag pushes an object onto the DTML namespace. Variables
will be looked up in the pushed object first.
with tag syntax:
<dtml-with Variable|expr="Expression">
</dtml-with>
The with tag is a block tag. It pushes the named variable or
variable expression onto the DTML namespace for the duration of
the with block. Thus names are looked up in the pushed object
first.
with tag.Looking up a variable in the REQUEST:
<dtml-with REQUEST only>
<dtml-if id>
<dtml-var id>
<dtml-else>
'id' was not in the request.
</dtml-if>
</dtml-with>
Pushing the first child on the DTML namespace:
<dtml-with expr="objectValues()[0]">
First child's id: <dtml-var id>
</dtml-with>