[Zope] access list directly through its index in zope

Dieter Maurer dieter@handshake.de
Fri, 25 Jul 2003 02:22:38 +0200


Ashish Thapliyal wrote at 2003-7-24 20:22 +0530:
 > ...
 > i have written a python script for ordered folder
 > ...
 > i am able to use it using tal also
 > 
 > --------------------------------------------
 > <table border=1 tal:define="subfolders python:here.orderFolder">
 > 
 >     <tr tal:condition="subfolders" tal:repeat="folder subfolders">
 > ...
 > python:folder.absolute_url() ...
 > but i want to access the subfolders list directly(through its index) like
 > subfolders[0].absolute_url() instead of going through a loop and accessing
 > like folder.absolute_url()

Just do it:

     "python: subfolders[0].absolute_url()"


Dieter