How to use image file without image objects
How do I refer to image file in dtml documents without creating image objects. For example, 1. setting the background. 2. Displaying pictures depending on the name for a large group of people. Thanks, -- sudhir
On Thu, 4 May 2000, Sudhir Kumar wrote:
How do I refer to image file in dtml documents without creating image objects.
Using a standard <img src="/Images/foo.jpg"> works in Zope pages. The advantage of using image objects is that you can "acquire" those images in subpages and the <dtml-var foo.jpg> takes care of height and width tags automatically for you. -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/ W. St. Paul, MN | | http://slashdot.org/ wilson@visi.com | <dtml-var pithy_quote> | http://linux.com/
Timothy Wilson wrote:
On Thu, 4 May 2000, Sudhir Kumar wrote:
How do I refer to image file in dtml documents without creating image objects.
Using a standard <img src="/Images/foo.jpg"> works in Zope pages. The advantage of using image objects is that you can "acquire" those images in subpages and the <dtml-var foo.jpg> takes care of height and width tags
^^^^^^^ Will likely return a key error. IIRC, you should enclose it in quotes? (This is why I don't use dots in my imagenames...too much hassle, IMO)
----- Original Message ----- From: "Bill Anderson" <bill@libc.org> To: "Timothy Wilson" <wilson@visi.com> Cc: "Sudhir Kumar" <sudhirlabh@earthlink.net>; <Zope@zope.org> Sent: Friday, May 05, 2000 7:23 AM Subject: Re: [Zope] How to use image file without image objects
Timothy Wilson wrote:
On Thu, 4 May 2000, Sudhir Kumar wrote:
How do I refer to image file in dtml documents without creating image objects.
Using a standard <img src="/Images/foo.jpg"> works in Zope pages. The advantage of using image objects is that you can "acquire" those images
in
subpages and the <dtml-var foo.jpg> takes care of height and width tags ^^^^^^^
Will likely return a key error.
IIRC, you should enclose it in quotes? (This is why I don't use dots in my imagenames...too much hassle, IMO)
Nope... That line is equivalent to <dtml-var name="foo.jpg">, and "." is perfectly legal in that context. If you put it in quotes, *then* you'll have trouble, because it would be <dtml-var expr="foo.jpg">. Python would be looking for the "jpg" attribute of "foo". Kevin
Kevin Dangoor wrote: [...]
IIRC, you should enclose it in quotes? (This is why I don't use dots in my imagenames...too much hassle, IMO)
Nope... That line is equivalent to <dtml-var name="foo.jpg">, and "." is perfectly legal in that context. If you put it in quotes, *then* you'll have trouble, because it would be <dtml-var expr="foo.jpg">. Python would be looking for the "jpg" attribute of "foo".
Kevin
Ahh, I knew there was _something_ that caused that error. I do recall running into this problem with the PSQL Input wizard.
participants (4)
-
Bill Anderson -
Kevin Dangoor -
Sudhir Kumar -
Timothy Wilson