Nuxeo mailing list archives
[CPS-devel] what is the correct way to display an image
Joachim Schmitz
js at aixtraware.de
Wed Sep 13 13:58:01 CEST 2006
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
This list archive provided by Nuxeo, the
leaders of open source ECM.
Check out the Nuxeo 5 open source,
standards-based ECM project.