[ZPT] Seeing &lt;IMG&gt; rather than <IMG> ???

Chris Meyers chris@hddesign.com
Wed, 24 Jul 2002 17:49:59 -0500


On Wed, Jul 24, 2002 at 06:27:24PM -0400, Brian Withun wrote:
> 
> I am trying to display photos (Photo product 1.2.0) using page templates,
> but I'm still kinda new at this.
> 
> I am using a master page template (does it matter?) which defines a slot
> that I'm filling according to the
> code below:
> 
>         <td valign=top metal:fill-slot="content">
>           <p tal:repeat="item python: container.objectValues(['Photo'])">
>             <span tal:replace="repeat/item/number"/>)
>             <span tal:replace="item/meta_type"/>:
>             <span tal:replace="python: item.tag(display='thumbnail')"/>:
>             <b><span tal:replace="item/id"/></b>
>           </p>
>         </td>
> 
> 
> What I'm ultimately getting is a page showing the HTML image tag itself, not
> the actual image
> 
> The HTML source shows
> 
> &lt;img src="http://abc.com/photos/serene.jpg?display=thumbnail" height="96"
> width="128" /&gt;
> 
> rather than
> 
> <img src="http://abc.com/photos/serene.jpg?display=thumbnail" height="96"
> width="128" />
> 
> 
> 
> I have tried this, but it's the same effect:
> 
>   <span tal:replace="item/tag"/>:
> 

You need to use 'structure' in your tal statements. Something like this should work.
 <span tal:replace="structure python: item.tag(display='thumbnail')"/>:

HTH,
Chris

> 
> -----------------------
> Server Info: Zope 2.3.2 (source release, python 1.5.2, linux2)
> 
> Thanks for any help!
> 
> Brian Withun
> 
> 
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt

-- 
Chris Meyers
Huttleston Data Design
7941 Tree Lane Suite 200
Madison WI 53717