Hi all, I'm trying to convert a dtml-in loop to a repeat loop in a Zope Page Template. I want to create a chain menu with options: Previous | Current | Next. This is my DTML Code (list_chain is a python method that returns three objects (Previous, Current, Next) or None for the object that doesn't exists. Example: The method returns (None, Current, Next) for the first object. <dtml-in list_chain> <dtml-if sequence-start> <dtml-if sequence-item> <a href="<dtml-var absolute_url>">Previous</a></dtml-if> <dtml-elif sequence-end> <dtml-if sequence-item> <a href="<dtml-var absolute_url>">Next</a></dtml-if> <dtml-else> <b><dtml-var title_or_id></b> </dtml-if> </dtml-in> I tried something and it looks like this (but I get errors): <div tal:repeat="item python:here.list_chain()"> <a class="gnawlink" href="" tal:condition="repeat/item/start" tal:attributes="href item/absolute_url">Previous</a> <a class="gnawlink" href="" tal:condition="repeat/item/end" tal:attributes="href item/absolute_url">Next</a> </div> Can someone help me? Greetz Nico
what errors ? --On Donnerstag, Mai 30, 2002 13:52:53 +0200 Nico de Boer <nico@nfg.nl> wrote:
Hi all,
I'm trying to convert a dtml-in loop to a repeat loop in a Zope Page Template.
I want to create a chain menu with options: Previous | Current | Next.
This is my DTML Code (list_chain is a python method that returns three objects (Previous, Current, Next) or None for the object that doesn't exists. Example: The method returns (None, Current, Next) for the first object.
<dtml-in list_chain> <dtml-if sequence-start> <dtml-if sequence-item> <a href="<dtml-var absolute_url>">Previous</a></dtml-if> <dtml-elif sequence-end> <dtml-if sequence-item> <a href="<dtml-var absolute_url>">Next</a></dtml-if> <dtml-else> <b><dtml-var title_or_id></b> </dtml-if> </dtml-in>
I tried something and it looks like this (but I get errors):
<div tal:repeat="item python:here.list_chain()"> <a class="gnawlink" href="" tal:condition="repeat/item/start" tal:attributes="href item/absolute_url">Previous</a> <a class="gnawlink" href="" tal:condition="repeat/item/end" tal:attributes="href item/absolute_url">Next</a> </div>
Can someone help me?
Greetz Nico
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Mit freundlichen Grüßen Joachim Schmitz -------------------------------------------------------------------- AixtraWare Ingenieurbüro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 -------------------------------------------------------------------- Key fingerprint = DA10 CC82 62F8 1DBB 39A1 1EDC 725B 3317 A8D7 C3A6 Keyserver: http://www.keyserver.net/en/
participants (2)
-
Joachim Schmitz -
Nico de Boer