Several months ago someone provided me with me with some sample code which did exactly what I wanted, but looking at it again it looks a little unwieldy and could do with tidying up. It consists of:-
<span tal:define="opts python:here.lib.parse_file(file=here.news,sepr=',',clone=1)"> <tal:block repeat="opt opts"> <li><a tal:content="python:opt[1]" tal:attributes="href python:'news_items/' + opt[0]"></a></li> </tal:block> </span> which involves parsing a file containing two fields separated by ',' eg. 001,abc 002,jkl 003,xyz The second field is just a string which appears in a selection menu, and the first is the name of a folder which contains an object called 'content' which get displayed on selecting the correponding link. I know this is not a particularly elegant way of doing it, but after looking at some TAL examples just can't figure out the right way to do it. Some help in simplifying it would be appreciated. -- John _______________________________________________ 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 )