[ZPT] strange metal error

Jeff Peterson jpeterso@rangebroadband.com
Wed, 20 Feb 2002 14:47:06 -0600


Both your macro and template have body tags....

The master Macro includes everything between the <html></html> then you
expand it in a <div> inside the template  body.

> -----Original Message-----
> From: zpt-admin@zope.org [mailto:zpt-admin@zope.org]On Behalf Of Brad
> Clements
> Sent: Wednesday, February 20, 2002 12:30 PM
> To: zpt@zope.org
> Subject: [ZPT] strange metal error
>
>
> Here's a weird situation, can anyone explain?
>
> Two Page Templates, Master, which looks like this:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
> "http://www.w3.org/TR/REC-html40/loose.dtd">
> <html metal:define-macro="Master">
>   <head>
>     <link rel="stylesheet" type="text/css"
>         tal:attributes="href python:here.StyleSheet.absolute_url()" />
>     <title tal:content="template/title">The title</title>
>   </head>

*****HERE****
>   <body tal:define="bgcolor template/bgcolor|string:white"
*****HERE****


> tal:attributes="bgcolor
> bgcolor">
>   <span tal:omit-tag="" tal:replace="structure here/JavaScript" />
>
> .. more snipped out ..
>
>
> Then, index_html, which looks like this:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <html>
>   <head>
>     <title tal:content="template/title">The title</title>
>   </head>
>

*****HERE****
>   <body>
*****HERE****


>     <div metal:use-macro="here/Master/macros/Master">
>       <div metal:fill-slot="main">
>
> ..  stuff here snipped out ..
>
>
> When I Test index_html, and view the source, I get this:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <html>
>   <head>
>     <title></title>
>   </head>
>
>   <body>
>     <html>
>   <head>
>     <link rel="stylesheet" type="text/css"
>           href="http://marimba.murkworks.com:6180/Holmes/StyleSheet" />
>     <title></title>
>   </head>
>   <body bgcolor="#990033">
>   <SCRIPT LANGUAGE="JavaScript">
>
>
> Notice TWO <body> tags!
>
> (I also see the DOCTYPE is different but that's okay)
>
> Index_html has de-selected "expand macros when editing"
>
> Zope 2.5 binary on Linux.
>
>
>
>
>
> Brad Clements,                bkc@murkworks.com   (315)268-1000
> http://www.murkworks.com                          (315)268-9812 Fax
> netmeeting: ils://ils.murkworks.com               AOL-IM: BKClements
>
>
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt
>