Welcome, guest | Sign In | My Account | Store | Cart

Seems like standart question: "How make/remove img border?" That is simple solution.

Python, 1 line
1
<dtml-var "picture.tag(border='5', align='left')">

1 comment

Rich Dougherty 22 years, 10 months ago  # | flag

A bit more info. I think this needs a little more explanation.

This recipe is for people who want to embed images in Zope DTML documents. DTML is a tag-based scripting language that is tightly integrated with Zope. You can get more info in the DTML chapter of the Zope book - http://www.zope.org/Members/michel/ZB/DTML.dtml.

To show an image in a DTML document, you would usually write something like

&lt;dtml-var &quot;myimage&quot;&gt;

When the page is being displayed Zope would look for "myimage" and call its __str__() method. This method inserts an HTML img tag with the correct src, height, width and alt attributes.

If you want to add your own attributes (or override default values for other attributes) then you can call its tag() method directly. This is what Mikhail has demonstrated above.

Created by Mikhail Kashkin on Tue, 5 Jun 2001 (PSF)
Python recipes (4591)
Mikhail Kashkin's recipes (1)

Required Modules

  • (none specified)

Other Information and Tasks