[Zope] Nesting <dtml-in>

Stuart 'Zen' Bishop zen@cs.rmit.edu.au
Sat, 6 Nov 1999 10:12:55 +1100 (EST)


On Fri, 5 Nov 1999, David S. Harrison wrote:

> Is it possible to nest <dtml-in> constructs such that the inner
> structure still has access to the data in the outer structure?
> My reading of the DTML guide seems to indicate that the answer
> is no.  It appears that the name of the item for iteration
> is "sequence-item" at all levels.

The dtml-let tag is your friend

<dtml-in myouterlist>
  <dtml-let outeritem=sequence-item>
    <dtml-in myinnerlist>
      <dtml-let inneritem=sequence-item>

	Inner: <dtml-var inneritem><br>
	Outer: <dtml-var outeritem><br>

      </dtml-let>
    </dtml-in>
  </dtml-let>
</dtml-in>

 ___
   //     Zen (alias Stuart Bishop)     Work: zen@cs.rmit.edu.au
  // E N  Senior Systems Alchemist      Play: zen@shangri-la.dropbear.id.au
 //__     Computer Science, RMIT 	 WWW: http://www.cs.rmit.edu.au/~zen