Rocky Burt wrote:
> Hi all,
> 
> Please don't mistake this as a proposal or anything of the sort but I
> was just curious what the rest of the zope3 community thought on this
> particular topic.  (Please forgive me if this topic has been exhaused to
> death already)
> 
> Its my personal opinion that anytime a page template requires logic
> complicated enough to warrant using a 'python:' expression, that logic
> should be re-thought and placed into a view class.  I know that some
> python: expressions are fairly simple, but for an HTML designer, *any*
> python: portions are dangerous to touch (and shouldn't be touched by the
> HTML designer).
> 
> What do you all think?

+/-0
I'd give it a +1 if TAL would support boolean operators :)
Seriously, there are situations where all you need is a trivial
AND or an OR expression, writing a view method to simply
be able to "select" a value (like in [0]) is just too much
overhead... Another use case is the passing of arguments
to a method/function/whatever - you might have a tal:repeat
where each iteration calls a view method and where just need
to supply an argument and you can't since TALs path syntax
doesn't support that (I say tal:repeat here, 'cos in other
situations you _probably_ can retrieve the value from REQUEST).

[0]: e.g. tal:define="foo python: bar and 'yes' or 'no'"

Cheers,
Igor
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to