[ZPT] Re: macros and contexts

Dieter Maurer dieter at handshake.de
Mon Sep 15 17:01:51 EDT 2003


Chris Withers wrote at 2003-9-15 13:07 +0100:
 > Seb Bacon wrote:
 > > Just to follow up, the solution I have thought of so far is to redefine 
 > > the value of  'here':
 > > 
 > >  <div tal:define="here nocall:here/foo">
 > >   <div metal:use-macro="here/widgetlib/macros/widget_1_view">
 > >     Widget 1 view goes here
 > >   </div>
 > >  </div>
 > > 
 > > Which is pretty nasty, but really seems to be the only solution...?
 > 
 > Why is it nasty? It is, after all, exactly what you're looking to do ;-)

It breaks abstraction...

In the widget library you do not know (and you should not know)
what "here" is and you should not make assumptions about it.


Dieter



More information about the ZPT mailing list