[Zope-CMF] printing archetypes imageField
J. Cameron Cooper
jccooper at jcameroncooper.com
Sat Jan 10 14:34:35 EST 2004
mulamba kamahunda wrote:
>I try to have an archetypes image printed on my page.
>When i do this
><div tal:content="python: resultObject.getImage1()">
> </div>
>The page is generated without the image but with the
>HTML code
><img src="http://url of the image" >
>
>
This is what you want. Writing the contents of an image inline is never
right in HTML, and rarely correct in other circumstances.
What you're getting, I suspect, is escaped HTML code, so that it is
displayed to the user rather than interpreted as a tag. You should
instead use::
<div tal:content="structure python: resultObject.getImage1()" />
If you really do want the image source inline (and most likely you
don't) there's probably and attribute or method on the object to get
that. Something like::
resultObject.getImage1().file
Use the source to find out.
--jcc
--
"My point and period will be throughly wrought,
Or well or ill, as this day's battle's fought."
More information about the Zope-CMF
mailing list