[Zope] access list directly through its index in zope
Ashish Thapliyal
ashish.thapliyal@itpreneurs.com
Thu, 24 Jul 2003 20:22:25 +0530
Hi
i have written a python script for ordered folder
orderFolder:
-------------------------------------------
list=[]
for folder in context.objectValues('Folder'):
list.insert(folder.getProperty('order'),folder)
return list
-------------------------------------------
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">
<td>
<a href="folder"
tal:attributes="href
python:folder.absolute_url()+'/managesitemap'"
tal:content="folder/getId">folder id</a>
</td>
</tr>
</table>
---------------------------------------------
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()
Thanks in Advance
Ashish