[Zope-dev] Making index_html a PageTemplate

Clemens Robbenhaar robbenhaar@espresto.com
Sun, 18 May 2003 20:37:50 +0200


Craeg K Strong writes:

 > FWIW I think this is an excellent idea, and I agree with your reasoning.
 [...]
 > Philipp von Weitershausen wrote:
 > >
 > > Therefore, I propose to make index_html a PageTemplate for 2.7. Since 
 > > this change would not affect the framework at all, it should not 
 > > interfere with the release schedule for 2.7. Please correct me if I'm 
 > > wrong.

 +1 from me, too.


 Just a trivial "technical" comment: If migrating "index_html" from
DTML, one maybe should additionally fix the current
'standard_html_header/footer'. These cannot be replaced well by ZPT as
they do present valid XHTML document.


 Instead one would need a "standard_html_layout" containing a METAL
macro, say "main" and a slot "content":

<html metal:define-macro="main">
  <head>
    <title tal:content="here/title_or_id">The title goes here</title>
  </head>
  <body bgcolor="#FFFFFF">
    <metal:block define-slot="content" />
    <p tal:content="structure here/ZopeAttributionButton"></p>
  </body>
</html>


 The default 'index_html' then would like:

<html metal:use-macro="here/standard_html_layout/macros/main">
  <body metal:fill-slot="content">
    <tal:block content="structure here/zope_quick_start" />
  </body>
</html>


Hm, now people have to swallow METAL, too. Does this look like a good or
a bad thing?

Cheers,
Clemens