[Zope] Building multiple documents from fragments(objects).
Oliver Bleutgen
Oliver Bleutgen <myzope@gmx.net>
Wed, 4 Apr 2001 20:26:56 +0200
> ...
> <div><h3>Build From Loop</h3>
> <ul><li>fragment1</li></ul>
> </div>
> <div><h3>Build From Loop</h3>
> <ul><li>fragment2</li></ul>
> </div>
> ...
> Any further hints?
substitute
<div><h3><dtml-var name="title_or_id"></h3>
with
<div><h3><dtml-var "_[_['sequence-item']].title_or_id()" ></h3>
and don't ask why dtml's syntax is so much nicer than perl ;->
short explanation:
_['text'] fetches the object with name text, so
_[variable] fetches the object with the name
contained in variable.
'sequence-item' is a "forbidden" variable
name in python (bc. of the '-'), so you have to
write _['sequence-item'] inside the outer brackets
above.
cheers,
oliver