To pass extra parameters to an image, so you can create a customized IMG tag, the syntax is <dtml-var "my_pic.tag(alt='My alt', scale=1.5)"> which works fine. However, the parameter I want to pass is the CSS attribute for class. I want to create an IMG tag that looks like this: <img src="foo" height=xx weight=xx class="logo"> I could just type this in directly to the DTML source, but I'd like to have the ALT, HEIGHT, and WIDTH tags calculated by Zope from the image title, and the graphic height and width. However, I can't use the 'class' keyword in Zope, presumably because apparently there's some *other* use of the word class in Python ;-). Is there a way around this? Thanks! -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
Hi Joel, good morning ;) This special item was discussed only a few messages above ;) Someone also mentioned an onging patch ;) (The thread was called: " .tag method of image and class declarations ?") Regards Tino Joel Burton wrote:
To pass extra parameters to an image, so you can create a customized IMG tag, the syntax is
<dtml-var "my_pic.tag(alt='My alt', scale=1.5)">
which works fine.
However, the parameter I want to pass is the CSS attribute for class. I want to create an IMG tag that looks like this:
<img src="foo" height=xx weight=xx class="logo">
I could just type this in directly to the DTML source, but I'd like to have the ALT, HEIGHT, and WIDTH tags calculated by Zope from the image title, and the graphic height and width.
However, I can't use the 'class' keyword in Zope, presumably because apparently there's some *other* use of the word class in Python ;-).
Is there a way around this?
Thanks!
-- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
I know this isn't good for strict xhtml but couldn't you use Class as an interim fix? ----- Original Message ----- From: "Joel Burton" <jburton@scw.org> To: <zope@zope.org> Sent: Tuesday, March 27, 2001 10:45 PM Subject: [Zope] Can't pass 'class' as keyword to .tag()?
To pass extra parameters to an image, so you can create a customized IMG tag, the syntax is
<dtml-var "my_pic.tag(alt='My alt', scale=1.5)">
which works fine.
However, the parameter I want to pass is the CSS attribute for class. I want to create an IMG tag that looks like this:
<img src="foo" height=xx weight=xx class="logo">
I could just type this in directly to the DTML source, but I'd like to have the ALT, HEIGHT, and WIDTH tags calculated by Zope from the image title, and the graphic height and width.
However, I can't use the 'class' keyword in Zope, presumably because apparently there's some *other* use of the word class in Python ;-).
Is there a way around this?
Thanks!
-- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Tue, 27 Mar 2001, Phil Harris wrote:
I know this isn't good for strict xhtml but couldn't you use Class as an interim fix?
(slowly, the sounds of the standards committee gnashing their teeth are heard.) Yep, you sure can, and boy, I should have thought of that, shouldn't I? Thanks--works great. I appreciate your help. -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
participants (3)
-
Joel Burton -
Phil Harris -
Tino Wildenhain