[Zope3-Users] Re: ZPT Reuse

Philipp von Weitershausen philipp at weitershausen.de
Fri Nov 19 18:41:21 EST 2004


Craig Ewington wrote:
> Thanks Philipp,
> 
> It seems I can also write a regular page template (just TAL, no METAL), 
> register that as a regular browser page, then in other ZPT files, I can 
> include it using:
> 
> <span tal:replace="structure context/@@pagename"></span>:
> 
> Are these two approaches functionally identical or should I perhaps 
> prefer one over the other?

Your approach simply inserts an arbitrary unicode string which has been 
rendered from a view lookup into the current template. The fact that 
this unicode string comes from a ZPT that has been registered as 
'pagename' is arbitrary.

My approach is more powerful in the way that you actually rely on METAL 
macros and can fill slots etc. I would prefer my approach :).

Philipp


More information about the Zope3-users mailing list