Re: what is the correct way to display an image

Joachim Schmitz <[email protected]>
Newsgroups gmane.comp.web.zope.cps.devel
Message-ID <[email protected]>
Lennart Regebro schrieb:
> Joachim Schmitz wrote:
>> hi,
>>
>> I have a flexible Document with an image called passport. String 
>> fields I can simply render with
>> <span tal:content="doc/stringfield" /span>
>>
>> How do I render the image ?
>> <span tal:replace="doc/passport ???????" /span>
> 
> That may depend on what type of image object it is. For OFS.Image and 
> derived objects you can use:
> 
>   <span tal:replace="structure doc/passport" />
> 
That does not work:

<span tal:replace="structure application_data/passport" />
is rendered as:
<img 
src="http://srp.aixtraware.de/students/E869596/application/1570867065__0001/passport" 
alt="" title="picture.jpg" height="399" width="300" />
which does not show the picture.

where as:
<img tal:condition="application_data/passport|nothing"
tal:attributes="src string:${context/absolute_url}/passport"/>
rendered as:
<img src="http://srp.aixtraware.de/students/E869596/application/passport" />

shows the image.


-- 
Mit freundlichen Grüßen                                Joachim Schmitz
......................................................................
AixtraWare eK ..Joachim Schmitz ..www.aixtraware.de ..t: +49-2464-8851
Hüsgenstr. 33a .....d-52457 Aldenhoven .............f: +49-2464-905163


_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.