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


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 
     chrism <[EMAIL PROTECTED]>, ctheune <[EMAIL PROTECTED]>, efge <[EMAIL 
     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 
 Status Pending, core/bug medium
To followup, visit:

= 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.

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

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

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:

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

And from a script:

page = some_page_object()
page.title = 'Foo'
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")


Zopeorg-webmaster mailing list

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

Reply via email to