Michael Fox wrote:
Hi *,
I have a folder which contains a bunch of ZPT's and images, some of which share the same unique ID as a ZPT which a ".jpg" extension. ie.
1000 1000.jpg 1001 1002 1003 1004.jpg 1004
I have an index_html object which will render any ZPT in this directory and the matching image, if available.
If there is no matching image I want to display an "image unavailable", but can't get this to work.
<span tal:define="image string:${here/id}.jpg">
<span tal:replace="image"></span>
<span tal:condition="not:python:here.objectIds(image)"> There are currently no items available. </span>
</span>
Regards,
Michael Fox ^-^ Analyst/Programmer <`-`> ___ Century Software ' `' '. Tel +61 2 9460 1422 `. ` ' .'. Fax +61 2 9460 3098 ||.' '._/'.`.' www.CenturySoftware.com.au "" " _______________________________________________ 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 )
hi, try following, <span tal:define="image python:str(template.id + '.jpg')"> <img src="" tal:attributes="src image"> </span> harshad -- Harshad Behere ZeOmega (www.zeomega.com) Open Minds' Open Solutions 20/21,Rajalakshmi Plaza, South End Road, Basavanagudi Bangalore-560 004 India