+-------[ David Bear ]----------------------
| I wanted to randomly pick a an image from an images folder and insert
| it into my page. So I created a python script the return a random
| selection from the images folder. 
| Then, in my zpt I did
| <span tal:define="global slot1 container/getimageR1" > 
|   <!-- slot one item -->
| </span>
| Later in in the <img> tag I wanted to to do
| <img tal:attributes="src slot1" >
| however I found that slot1 was not giving me the full path to the
| images folder. So I went back and did this:


| It just seems there should be a better way. Anyone have a suggestion?

Get your getimageR1 script to return randomImage.absolute_url(), instead of
the image itself?

Andrew Milton
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to