[ZPT] call image from template?
Chris Withers
chrisw@nipltd.com
Mon, 08 Apr 2002 08:18:27 +0100
Keep stuff on the list ;-)
Call Me Audrey wrote:
>
> i actually did name my image 'image' in another effort to call it period
> rather than generically. then "img src='image'" works -- simple, no tal. but
> that doesn't seem like a long-term plan.
>
> the line i sent before (as well as when i add ="" to src) gets interpreted
> strangely, returns the following source code:
> <img src="[correct path]/image" alt="" height="50" width="50" border="0"
> />
> why do the carrots get converted like that?
Ah, okay, this is a "d'oh!" on your part that I'm usually guilty of ;-)
You want:
<img src tal:replace="structure: here/image">
...since that tells ZPT not to HTML-quote the text used to replace the tag.
btw, what you're probably going to want is:
<img src tal:replace="structure: python: getattr(here,imageid)()">
cheers,
Chris