Tonico Strasser wrote:

Hi Jean-Marc!

I agree that a view should not be able to modify the data model. But I think tal:define is a must have :)

For example: I need tal:define to define names for generic macros:

<ul tal:define="list main_navigation">
  <li metal:use-macro="macros/li_repeat"/>
</ul>

The 'li_repeat' macro expects the name 'list'.

Tonico


That's exactly what I'm saying: if templates did not try to create their own data layer, the 'li_repeat' macro could get the data from the model (instead it has to rely on cross-template communication)

that's an anti-pattern which is the consequence of having introduced tal:define. :-)

/JM
_______________________________________________
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