tal define and repeat
I have want to use something like <div tal:repeat="topic python:container.listZPT"> <p tal:content="topic/title_or_id"> stuff </p> </div> the listZPT is a script the returns a list of page template objects. this throws an TALES exception on repeat topic. Is it not possible to repeat over a list object in TAL? -- David Bear College of Public Programs/ASU Mail Code 0803
David Bear wrote:
I have want to use something like
<div tal:repeat="topic python:container.listZPT"> <p tal:content="topic/title_or_id"> stuff </p> </div>
the listZPT is a script the returns a list of page template objects.
this throws an TALES exception on repeat topic.
Is it not possible to repeat over a list object in TAL?
You need to 'call' your script: i.e.: <div tal:repeat="topic python:container.listZPT()">
Hi, --On Donnerstag, 5. Dezember 2002 12:12 -0700 Mark Gibson <mark@dimensional.com> wrote:
David Bear wrote:
I have want to use something like
<div tal:repeat="topic python:container.listZPT"> <p tal:content="topic/title_or_id"> stuff </p> </div>
the listZPT is a script the returns a list of page template objects.
this throws an TALES exception on repeat topic.
Is it not possible to repeat over a list object in TAL?
repeating over a list is what repeating means in TAL. <p tal:repeat="topic container/listZPT" tal:content="topic/title_or_id"> stuff </p> You dont need the extra <div> around if its not for structuring the content. Regards Tino
You need to 'call' your script:
i.e.: <div tal:repeat="topic python:container.listZPT()">
Why not making it more complex and wrong? ;))
participants (4)
-
David Bear -
Jamie Heilman -
Mark Gibson -
Tino Wildenhain