[Zope] Background Images

Martijn Pieters mj@antraciet.nl
Thu, 22 Jul 1999 13:33:55 +0200


At 09:01 21/07/99 , Andreas Kostyrka wrote:
>On Wed, 21 Jul 1999, Arpad Kiss wrote:
>
> > > A related question:
> > > How does one insert an image with BORDER=0?
> >
> > <img src="tealtile" border=0>
>That is only partially correct. I'd rather prefer it with <dtml-var>
>notation, because <dtml-var> always returns the true absolute URL. Which
>is an advantage, because the image is probably downloaded once, instead
>for once per subfolder.

Zope 1.x:

<!--#with tealtile-->
<IMG SRC="<!--#var absolute-url-->" BORDER=0 WIDTH=<!--#var width--> 
HEIGHT=<!--#var height--> ALT="<!--#var title_or_id-->">
<!--#/with-->

Zope 2:

<dtml-var "tealtile.tag(border=0)">
(Returns: <img src="http://myserv/url/to/tealtile" width="xx" height="xx" 
alt="title or 'tealtile'" border=0>)

If you don't want width, height or alt tags, just add "width=''", 
"height=''" and/or "alt=''" respectively to the call to tag(), like so:

<dtml-var "tealtile.tag(border=0, alt='', width='', height='')">
(Returns: <img src="http://myserv/url/to/tealtile" border=0>)

Any other keywords (like border) are added to the tag as quoted attributes.

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------