[Zope] IMG attributes in ZPT
Troy Farrell
troy@entheossoft.com
Fri, 18 Oct 2002 22:40:24 -0500
Ouch. No one bothered to correct my violation of the English language.
I'm here to second your request.
Troy Farrell wrote:
> Jon, I'm hear to second your request. I got sick of the blatant XHTML
> standards violation here, so I edited Image.py, commenting out lines 748
> and 749. Anyway, that fixes the direct call method. I got sick of
> editing source code for all the installs (and to lazy to make a
> HotFix/Monkey Patch - religous debate anyone?), so for ZPT, I started
> using this when I didn't want to hard code it:
>
> <img tal:define="image python:getattr(here.img,'guests_logo.png')"
> tal:attributes="src image/absolute_url;
> height image/height;
> width image/width;
> alt image/title_or_id" style="border: 0;">
>
> This works for an image guests_logo.png stored in a subfolder img.
>
> HTH,
> Troy