Jason C. Leach wrote:


I'm wondering how I can do this little trick (sp_info is a globaly devide var, it's a dictionary obj):

            <option tal:repeat="group groups/existing/high"
tal:attributes="onmouseover string:doTooltip(event, '${sp_info/${group}/common_name}')" onmouseout="hideTip()">

So based on my the value of 'group' from my repeat, I want to use the value to look up another value in a different dictionary. It works if I do this: (event, '${sp_info/whatever/common_name}') but does not like me using the embedded ${group}.


Hi Jason,

I didn't know you could nest ${} objects in a string: construct.

You might make life easier using python.  Maybe something like:

tal:attributes="onmouseover python: sp_info[ group ] + '/' + common_name"

I have no idea what "common_name" is supposed to be, here I assumed its a global var.


Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to