[Zope] Uses of METAL?
Felix Ulrich-Oltean
felix@chaptereight.com
Mon, 4 Nov 2002 13:57:48 +0000
On Mon, Nov 04, 2002 at 09:37:30AM -0400, Alec Munro wrote:
> How are other people using METAL in serious applications? I would
> love to hear how it is being used by those more familiar with Zope
> than myself. Thanks very much,
The main thing we use macros for is to define an overall "master page"
with the general layout of pages in a site, including default bits
which are wrapped in metal:define-slot, to allow client[1] templates to
customize those bits. Most templates/pages in the sites are then
something like this:
<html metal:use-macro="container/master_page.html/macros/page">
<metal:block metal:fill-slot="">
Some really <b>fancy</b>content.
</metal:block>
</html>
I know you can use tal and still have components and wel--structured
sites, but in my short experience, it seems that using METAL gives you
more power in the actual client[1] templates, whereas with TAL alone
I seemed to pull in a lot of things into a "main" template, taking
power away from the specialized templates.
1 - "client" - by client templates I mean a template that uses the
template with macros in, i.e. the client template is either applied to
the called object, or IS the called object.
Felix.