[Zope] ZPT macro using a macro from the same page template

Dieter Maurer dieter@handshake.de
Wed, 23 Jul 2003 18:42:29 +0200


Gilles Lenfant wrote at 2003-7-23 12:15 +0200:
 > ....
 > IMO, some "thistemplate" like global variable in TALES expressions would fix
 > this in an elegant way. But dunno if this is an easy work.

I looked into it to extend Page Template accordingly.

However, it turned out to be too difficult:

   Passed in slots would need to be treated as closures
   (code + variable bindungs) as such a slot logically
   belongs to the macro-user and not the macro.

   Context would have to change at every boundary of a macro use or a filled
   in slot.

 > > Nowadays, we almost always use ZPT through CMF's "portal_skins".
 > > Therefore, "container" is the portal and we access
 > > the ZPTs via "container/ZPT_id".
 > 
 > Making something like this in CMF/Plone but this goes through the
 > acquisition machinery to find the page template itself. The above stated
 > solution would do this faster.

Right.

 > And I sometimes make stuff with no CMF/Plone :o)
 > Cheers

My "SkinnedFolder" product may help:

  <http://www.dieter.handshake.de/pyprojects/zope>



Dieter