[Zope3-Users] test() in TALES in Zope3
Andreas Jung
lists at andreas-jung.com
Wed Feb 1 08:07:00 EST 2006
--On 1. Februar 2006 07:56:47 -0500 Gary Poster <gary at zope.com> wrote:
>
> On Feb 1, 2006, at 3:17 AM, Frank Burkhardt wrote:
>
>> On Wed, Feb 01, 2006 at 09:04:36AM +0100, Frank Burkhardt wrote:
>>
>> [snip]
>>
>>> <div tal:attributes="class python: 'foo' + test(condition ==
>>> True,' bar','')" />
>>>
>>> Is this possible?
>>
>> Impressing simple solution :-) .
>
> FWIW the classic Zope 3 solution is to say "Don't do that in the
> template! Do it in the view class!". I'll let others add vigor, if
> they wish. I just wanted you to know the "purist" answer in case you
> cared. ;-)
>
If you have only one python: statement within your template then a view
class is pretty much overhead (and a waste of manpower to write it)...
just my 2 cents,
-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20060201/96668d3c/attachment.bin
More information about the Zope3-users
mailing list