[Zope] how to get title property from python?

Lennart Regebro lennart@regebro.nu
Wed, 19 Mar 2003 14:05:18 +0100


From: "Jaroslav Lukesh" <lukesh@seznam.cz>
> I customize STX and want to get from image property Title image
description
> in python script:
>
> <img src="%s" alt="get_title_from(%s)">
>
> Would you like to know me how, please?

If the image object is called "image", then you use "image.title".
To get HTML that shows the image, you can use the tag() method:
"image.tag()" It will set the alt to the image title automatically.
>From DTML or ZPT you do this by just calling the image.

<dtml-var image>
or
<img tal:replace="here/image">