I'm CCing a few other people, hopefully one of them will be able to help...

Chris

R. David Murray wrote:
I'm no longer actively involved in zope3 development.  I'd like to get
off this mailing list.  However, when I go to the collector monitor
list I'm not listed as a subscriber.  Can you figure out why I'm
getting these and get my name deleted?  Thanks.

---------- Forwarded message ----------
Date: Mon, 27 Jun 2005 14:59:42 -0400
From: "Collector: Zope 3 ..." <[EMAIL PROTECTED]>
To: nucleus <[EMAIL PROTECTED]>, klm <[EMAIL PROTECTED]>, jim <[EMAIL 
PROTECTED]>,
     chrism <[EMAIL PROTECTED]>, ctheune <[EMAIL PROTECTED]>, efge <[EMAIL 
PROTECTED]>,
     fdrake <[EMAIL PROTECTED]>, janko <[EMAIL PROTECTED]>,
     magnus <[EMAIL PROTECTED]>, mj <[EMAIL PROTECTED]>,
     poster <[EMAIL PROTECTED]>, rdmurray <[EMAIL PROTECTED]>,
     srichter <[EMAIL PROTECTED]>, sspickle <[EMAIL PROTECTED]>,
     stevea <[EMAIL PROTECTED]>, tseaver <[EMAIL PROTECTED]>,
     philikon <[EMAIL PROTECTED]>, garrett <[EMAIL PROTECTED]>,
     tim_one <[EMAIL PROTECTED]>, hdima <[EMAIL PROTECTED]>,
     anguenot <[EMAIL PROTECTED]>
Subject: [Z3d] 420/ 1 Request "Nested metal:use-macro ignored if parent has
    value "default""

Issue #420 Update (Request) "Nested metal:use-macro ignored if parent has value 
"default""
 Status Pending, core/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope3-dev/420

==============================================================
= Request - Entry #1 by nucleus on Jun 27, 2005 2:59 pm

If a 'metal:use-macro' is nested in another 'metal:use-macro' and the value of the outer 
'metal:use-macro' is "default" the inner 'metal:use-macro' will be ignored.

An example:

<div metal:use-macro="default">
  <div metal:use-macro="x">
    This is not macro x.
  </div>
</div>

The example above should raise a KeyError exception as in the following case:

<div tal:content="default">
  <div metal:use-macro="x">
    KeyError
  </div>
</div>

Use case for this nesting technique: I could simply nest 'metal:use-macros' and 
"customize" only parts of a page that I want.

Illustrative example:

<html>
  <head metal:use-macro="macros/head|default">
    <title tal:content="title">A minimal page</title>
  </head>
  <body metal:use-macro="macros/body|default">
    <div metal:use-macro="header|default">
      Site header
    </div>
    <div metal:use-macro="macros/content|default">
      Default content.
    </div>
    <div metal:use-macro="macros/footer|default">
      Footer.
    </div>
  </body>
</html>

And from a script:

page = some_page_object()
page.title = 'Foo'
page.macros.update(some_pt_macros)
return page.render()

(Instead of writing "macros/name|default" in the template I could also use a 'Default' 
instance instead of a real macro for the value and simply write "macros/name")

--
Tonico
==============================================================

_______________________________________________
Zopeorg-webmaster mailing list
[EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zopeorg-webmaster


--
Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk
_______________________________________________
Zope-web maillist  -  Zope-web@zope.org
http://mail.zope.org/mailman/listinfo/zope-web

Reply via email to