I got this going no problem: <img src="/logo.gif"> Then I spent ages today trying to figure out why the following wouldn't work: <img src="/logo.gif" tal:attributes="src here/logo.gif" /> Eventually I looked at other examples like this: <img src="/logo.gif" border="0" tal:define="im here/logo.gif" tal:attributes="src im/absolute_url; width im/width; height im/height; alt im/title" /> And then I figured that I needed a magic word: <img src="/logo.gif" tal:attributes="src here/logo.gif/absolute_url" /> I guess these things become obvious over time...
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Crosbie Fitch Sent: Wednesday, January 15, 2003 3:20 PM To: Zope (E-mail) Subject: [Zope] ZPT img using attributes (newbie)
I got this going no problem:
<img src="/logo.gif">
Then I spent ages today trying to figure out why the following wouldn't work:
<img src="/logo.gif" tal:attributes="src here/logo.gif" />
Try this: <img src="/logo.gif" tal:replace="structure here/logo.gif"> or possibly: <img src="/logo.gif" tal:replace="structure here/logo.gif/tag"> Since I'm new to ZPT it might be there is a reason for not doing this but... it seems right to me.
<img src="/logo.gif" tal:replace="structure here/logo.gif">
or possibly:
<img src="/logo.gif" tal:replace="structure here/logo.gif/tag">
Since I'm new to ZPT it might be there is a reason for not doing this but... it seems right to me.
Unfortunately tag() is broken, it generates invalid html, so while these would work if tag() was fixed, the other techniques are probably better for the time being. -- Jamie Heilman http://audible.transient.net/~jamie/ "Paranoia is a disease unto itself, and may I add, the person standing next to you may not be who they appear to be, so take precaution." -Sathington Willoughby
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Jamie Heilman Sent: Wednesday, January 15, 2003 4:09 PM To: Zope (E-mail) Subject: Re: [Zope] ZPT img using attributes (newbie)
<img src="/logo.gif" tal:replace="structure here/logo.gif">
or possibly:
<img src="/logo.gif" tal:replace="structure here/logo.gif/tag">
Since I'm new to ZPT it might be there is a reason for not doing this but... it seems right to me.
Unfortunately tag() is broken, it generates invalid html, so while these would work if tag() was fixed, the other techniques are probably better for the time being.
Could you be more specific? I'm using these and they seem fine. I know I make use of tag() implicitly in DTML all the time and it's fine. There is the annoying "/>" XHTMLism but otherwise it seems ok.
Could you be more specific? I'm using these and they seem fine. I know I make use of tag() implicitly in DTML all the time and it's fine. There is the annoying "/>" XHTMLism but otherwise it seems ok.
The /> is correct and valid xhtml, its not so much annoying as it is requisite for empty elements and maintaining a notion of backward compatibility--collector issue 634 is what I was referring to in terms of the tag() method being buggy. Then there's obnoxious use of the title attribute by the tag() method which I filed a bug on also, though my hopes for the rectification of that issue are admittedly slim. Ofcourse if you find xhtml's termination of empty elements to be an annoyance, chances are you don't care a whole lot for the rest of the standard so tag()'s current behavior shouldn't bother you at all. -- Jamie Heilman http://audible.transient.net/~jamie/ "You came all this way, without saying squat, and now you're trying to tell me a '56 Chevy can beat a '47 Buick in a dead quarter mile? I liked you better when you weren't saying squat kid." -Buddy
participants (3)
-
Charlie Reiman -
Crosbie Fitch -
Jamie Heilman