[Zope] Chain menu
Nico de Boer
nico@nfg.nl
22 May 2002 12:37:36 +0200
Hi all,
I'm working on a news product and now i want to make a chain menu,
which shows the brothers and sisters of the object.
I have made a python method for this. I get back a list of three
tuples : [{sortkey,object1},{sortkey,object2},{sortkey,object3}]
The first listitem is the previous object, the second the current and
the last the next object. The first item is None if there is no
previous object.
How can i implement this in DTML?
I've made a start but it doesn't work properly(the python method is
called list_chain):
<dtml-in list_chain>
<dtml-if "_['sequence-item'] != None and _['sequence-number']==1">
<a href="<dtml-var "_['sequence-item'].absolute_url()">">Previous</a>
<dtml-elif "_['sequence-item'] != None and _['sequence-number']==2">
<dtml-var "_['sequence-item'].title_or_id()">
<dtml-elif "_['sequence-item'] != None and _['sequence-number']==3">
<a href="<dtml-var "_['sequence-item'].absolute_url()">">Next</a>
</dtml-if>
</dtml-in>
Can anybody help me?
Greetz and thanks,
Nico