<html> <head> <title tal:content="template/title">Title</title> </head> <body tal:define="objects container/objectValues;temp python:objects.sort(lambda x, y: cmp(x.title.upper(), y.title.upper()))"> <font size=+1 tal:content="template/title">Title</font> <ul tal:condition="objects"> <tal:block repeat="item objects"> <li tal:condition="python:item.id!=template.id"> <span tal:replace="item/title">ITEM</span> </li> </tal:block> </ul> </body> </html> You could also use item/title_or_id if you wanted to display the id if the object has no title... G. Clifford Williams wrote:
I'm just starting to work with ZPT (as of today), the first question I have is; Is there a way to keep "template/title" from being displayed in the list that is generated by the tal:repeate directive?
I'd like to generate a list of links that does not include the index_html page.
My second question is: Is there any way to sort the list that's generated?
--The code that I have--
<title tal:content="template/title">Title</title> </head> <body> <font size=+1 tal:content="template/title">Title</font> <UL tal:condition="container/objectValues"> <LI tal:repeat="item container/objectValues"> <span tal:replace="item/title">ITEM</span> </LI> </UL>
thanks in advance
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )