[ZPT] FW: [Zope] zope page templates and image tags. tal:attributes:

Casey Duncan casey@zope.com
Wed, 1 May 2002 13:47:39 -0400


How about:

<img tal:replace=3D"python:here.images.image.tag(border=3D1)" />

Insert whatever attributes of the image you want to set as arguments to t=
he=20
tag method.

hth,

Casey

On Wednesday 01 May 2002 01:23 pm, Trevor Toenjes allegedly wrote:
> Russell,
> I have forwarded your email to the ZPT list where you are more likely t=
o get
> ZPT help.
> -Trevor
>=20
>=20
> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> Russell Uman
> Sent: Wednesday, May 01, 2002 1:15 PM
> To: zope@zope.org
> Subject: [Zope] zope page templates and image tags. tal:attributes:
>=20
>=20
>=20
> hi.
>=20
> i'm trying to call an image and set the attributes of the image tag
> dynamically.
>=20
> <span tal:replace=3D"structure container/images/image.gif"
> tal:attributes=3D"border string:1"></span><br>
> <img tal:replace=3D"structure container/images/image.gif"
> tal:attributes=3D"border string:1"><br>
>=20
> in each case i get an error:
>=20
> Error Type: AttributeError
> Error Value: Context instance has no attribute 'getCompilerError'
>=20
> so instead i am building my images like this:
>=20
> <img src=3Dnothing.gif tal:attributes=3D"src string:images/image.gif; b=
order
> string:1">
>=20
> this seems kind of painful to me. can someone explain the error i am
> receiving and give me a clue about how to do this the right way
> in zope? should i give up on page templates and use dtml instead? point=
ers
> to useful documentation would be greatly appreciated.
> i've read the zope book up and down but clearly i need more fine manual=
s to
> read...
>=20
> thanks!
>=20
>=20
>=20
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>=20
>=20
>=20
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt
>=20