[Zope] how to get the value of image properties?

Stephen Pitts smpitts@midsouth.rr.com
Wed, 29 Dec 1999 09:48:31 -0600


On Wed, Dec 29, 1999 at 02:04:43PM +0200, Joonas Rapila wrote:
> I think I saw an example of this at the zope site, but couldn't find 
> it anymore..
> The problem:
> 
> I need the "width" and "height" -values of images as dtml-strings, 
> but how is it done?
> 
> an example:
> 
> <TD WIDTH="[the width of image1]"><dtml-var image1></TD>
>             ^^^^^^^^^^^^^^^^^^^^^
>             How do I get this? (for example, it could be something like "100")
> 

<TD WIDTH="<dtml-var "image1.width">"><dtml-var image1></td>

<dtml-var xxx> calls the variable literally named xxx (when an image is
called, it returns an <IMG> tag for itself)

<dtml-var "xxx"> evaluates the Python expression "xxx"
-- 
Stephen Pitts
smpitts@midsouth.rr.com
webmaster - http://www.mschess.org