[ZPT] Anyone made a 'library' script for page templates?

Tony McDonald tony.mcdonald@ncl.ac.uk
Wed, 07 Aug 2002 08:33:30 +0100


On 5/8/02 9:43 am, "Chris Withers" <chrisw@nipltd.com> wrote:

> Tony McDonald wrote:
>> 
>> Has anyone figured how to manage different page templates on a site? I know
>> I can have a copy of the page template I want and use that, but I'm trying
>> to get something more elegant for our less IT-literate people.
> 
> Have you looked at METAL? I couldn't qutie get what you're asking for though,
> so 
> if METAL doesn't cover it, maybe the skins tool from CMF would help, or maybe
> I 
> need help understanding? :-)
> 

I've re-read my original post, it's not as clear as it should be.

If you select a PageTemplate from the ZMI popup, you get a canned version
that you'll almost certainly need to change.

For instance one of our sites uses this as their main template;

<doc metal:use-macro="root/SITE_macros/Macros_clean/macros/pre"/>
<html metal:use-macro="root/SITE_macros/chooseAMacro">
  <head>
    <title tal:content="template/title">The title</title>
  </head>
  <body>
  <div id="Header" tal:content="template/title">
        Title.
    </div>
<div id="Content" metal:fill-slot="Content">

</div>
</body>
</html>

In this example, the first line is used to get a DOCTYPE, the second line is
a link to a python script that does a dynamic selection of 3 or 4 layouts.

Thing is, in other sites (running from the same 2.5.1 instance), this is
either not relevant or even overkill.

What I guess I'm after is a someway of having different ZPT templates made
available to users of our sites. I know I can copy the PageTemplate product
into each Product folder of our INSTANCE_HOMEs, and edit www/default.html,
but that's a bit cheesy, no?

Cheers for the thoughts Chris,
Tone.
-- 
Dr Tony McDonald,  Assistant Director, FMCC, http://www.fmcc.org.uk/
The Medical School, Newcastle University Tel: +44 191 243 6140
A Zope list for UK HE/FE  http://www.fmcc.org.uk/mailman/listinfo/zope