[Zope3-dev] Re: idea: attr:foo addition to tal
Philipp von Weitershausen
philipp at weitershausen.de
Thu Jul 22 12:00:04 EDT 2004
Godefroid Chapelle wrote:
>> I was writing yet another tal:attributes expression, when I had the
>> following idea.
>>
>> How about if there were an 'attr' namespace that the tales interpreter
>> understands that replaces attributes?
>>
>> So, instead of
>>
>> <a tal:attributes="href item/url" tal:content="item/description" />
>>
>> we get
>>
>> <a attr:href="item/url" tal:content="item/description" />
>>
>
> I think I like this idea a lot as it would make templates more readable.
>
> I would not use attr as the namespace though.
>
> Also, I am not sure how to combine it with i18n:attributes.
It could even combine in the following way:
<input type="submit"
attr:value="here/label"
i18nattr:value="button-label" />
where button-label is the message id.
+1 from me for SteveA's idea!
Philipp
More information about the Zope3-dev
mailing list