[Zope] Re: Attributes
Andrew Williams
Andrew Williams" <andrew@goshenwoods.com
Wed, 18 Jun 2003 15:30:40 -0400
Simon:
The tal:attributes="src here/images/ldmlMenu_01.png" is actually replacing
src with the default view of an image which is the html tag itself.
An *easier* way of doing what you want to do would be:
<img src="#" alt="#" tal:replace="structure here/images/ldmlMenu_01.png" />
This will replace the <img [...]> tag with <img
src="http://127.0.0.1:8080/ldml/images/ldmlMenu_01.png" alt="" title=""
height="2" width="170" border="0" />
The tal:replace command replace whatever tag it resides in. The "structure
[...]" will tell Zope not to escape characters (ie " == ").
hth,
Andrew Williams
"Simon Forster" <simon-lists@ldml.com> wrote in message
news:C62CE791-A1BF-11D7-9ACC-000A9579123A@ldml.com...
> This should be simplicity itself but I've read and re-read what the
> Zope book has to say on this and I don't understand...
>
> <img src="../images/ldmlMenu_01.png" width="170" height="2" border="0"
> tal:attributes="src here/images/ldmlMenu_01.png">
>
> should, if my understanding is correct, replace the src attribute for
> the image with the path defined by the tal:attributes statement. My
> understanding is wrong because I get:
>
> <img src="<img
> src="http://127.0.0.1:8080/ldml/images/ldmlMenu_01.png"
> alt="" title="" height="2"
> width="170" border="0" />" width="170"
> height="2" border="0">
>
> To put this in context, this snippet is contained in a format file
> which is included in a number of other files. Not knowing better I've
> used the construct:
>
> <div id="menuMain" tal:replace="structure here/main_menu">
> ...placeholder code...
> </div>
>
> to include this although I understand that I should use Macros to
> include this. I'll change this shortly.
>
> It looks as if...
>
> No I wont embarrass myself further. Would someone explain what's going
> on here and where my understanding is wrong.
>
> TIA
>
> Simon Forster
> ___________________________________________________
> LDML Ltd, Office One, 16 Canham Road, London, W3 7SR, UK
> Tel: +44 (0)20 8749 7766 Fax: +44 (0)70 9230 5247
> ___________________________________________________
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>