Re: [Zope] how to get title property from python?
: OdesÃlatel: Chris Withers <chrisw@nipltd.com> : > I customize STX and want to get from image property Title image description : > in python script: : > : > <img src="%s" alt="get_title_from(%s)"> : : perhaps you mean something like this? : : <img src="fred.jpg" alt="xxx" tal:attributes="alt here/?fred.jpg/title"> No, I dont mean DTML document/TAL, I mean in python scripts from lib/python/Structuredtext: output('<a href="%s/sys_show_fullimage"><img src="%s.thumb.jpg" alt="%s" align="%s"></a>\n' % (doc.href, doc.href, doc.href, doc.align)) So ALT is not from doc.getNodeValue() like in STX, but from image property Title. Sorry for bad question. J. Lukesh
Jaroslav Lukesh wrote:
No, I dont mean DTML document/TAL, I mean in python scripts from lib/python/Structuredtext:
output('<a href="%s/sys_show_fullimage"><img src="%s.thumb.jpg" alt="%s" align="%s"></a>\n' % (doc.href, doc.href, doc.href, doc.align))
So ALT is not from doc.getNodeValue() like in STX, but from image property Title.
What is 'doc'? Would doc.title work? cheers, Chris
participants (2)
-
Chris Withers -
Jaroslav Lukesh