[Zope-CMF] Accessing object properties from URL, displaying image
Agata Cruickshank
A.Cruickshank at bbk.ac.uk
Wed Aug 25 11:13:51 EDT 2004
I have a sequence of news articles which display article's title plus image called news + sequence-number (news1, news2, news3). The images are independent from news and stored in a different directory. The below code works, but I wonder how can I access the image properties (title) to display in the alt tag
<img src="site_images/news<dtml-var sequence-number>" alt=" " >
- I need something like <dtml-var expr="site_images/news<dtml-var sequence-number">"> , but don't know how to make it work in CMF.
<dtml-var expr=" 'site_images.news' + _.str(_['sequence-number'])">
and <dtml-var expr="'site_images.news%s' %_['sequence-number']"> return the string rather than image.
Many thanks for any suggestions,
Agata
More information about the Zope-CMF
mailing list