Beno, I can't find your original question, so I'm not sure I fully get what you're trying to do, but if you just want to dynamically create a style attribute, do something like: <element tal:attributes="style python:'font-size: %d;' % here.sizeCalc(44,here.size(None, context))"> or, a bit neater: <el tal:define="fsize python:here.sizeCalc(44, here.size(None, context))" tal:attributes="style string:font-size: ${fsize};" > HTH Felix. On Sun, Oct 06, 2002 at 04:53:16PM -0400, beno wrote:
So instead of: <font style="font: tal:attributes='python:here.sizeCalc(44,here.size(None, context))'" >
which most probably will not be changed if rendered by ZPT, You may try: <font style="font' tal:attributes="style python:here.sizeCalc(44,here.size(None, context))" >
I've tried several variations of this *except* the one you specify because after the second *font* you have syntax that must be a typo: a single quote that isn't closed elsewhere and the HTML requires a colon there. At any rate, I've had no success. Please be patient and tell me once again...