[Zope3-dev] Number of languages in Zope 3
Andy McKay
andy@agmweb.ca
Wed, 09 Apr 2003 11:52:44 +0100
>> But now you want to add a custom title attribute. Just because of this
>> you have to switch to a completely different syntax:
>>
>> <img
>> tal:replace="structure
>> python:here.Imagefolder.imagename.tag(title='MyTitle')"
>> src="" />
>
>> This is even hard to get for somebody who knows Python because you are
>> limited to having to use single quotes in the brackets due to some
>> limitation of the TAL parser.
>
> I'd suggest writing this as a method in a supporting view class.
I don't know much about zope 3 at the moment, but how does writing a
supporting view class make passing parameters from a template easier?
I think the point here is that the template, contains a value that you
want to pass to the method. This is common when one does a tal:repeat,
and then pass some value of that repeat off to a function for each
iteration.
--
Andy McKay