[Zope] Converting DTML IN loop to Repeat loop ZPT

Joachim Schmitz js@aixtraware.de
Thu, 30 May 2002 14:31:18 +0200


what errors ?

--On Donnerstag, Mai 30, 2002 13:52:53 +0200 Nico de Boer <nico@nfg.nl>=20
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=3D"<dtml-var absolute_url>">Previous</a></dtml-if>
> <dtml-elif sequence-end>
>   <dtml-if sequence-item>
>    <a href=3D"<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=3D"item python:here.list_chain()">
>  <a class=3D"gnawlink" href=3D""
>     tal:condition=3D"repeat/item/start"
>     tal:attributes=3D"href item/absolute_url">Previous</a>
>  <a class=3D"gnawlink" href=3D""
>     tal:condition=3D"repeat/item/end"
>     tal:attributes=3D"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=FC=DFen                              Joachim Schmitz
--------------------------------------------------------------------
AixtraWare Ingenieurb=FCro f=FCr Internetanwendungen
H=FCsgenstr. 33a, D-52457 Aldenhoven
Telefon: +49-2464-8851, FAX: +49-2464-905163
--------------------------------------------------------------------
Key fingerprint =3D DA10 CC82 62F8 1DBB 39A1  1EDC 725B 3317 A8D7 C3A6
Keyserver: http://www.keyserver.net/en/