Mailing List Archive

Re: [Zopeorg-webmaster] [Z3d] 420/ 1 Request "Nested metal:use-macro ignored if parent has value "default"" (fwd)
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 ..." <jim@zope.com>
> To: nucleus <contact_tonico@yahoo.de>, klm <klm@i.am>, jim <jim@zope.com>,
> chrism <chrism@plope.com>, ctheune <ct@gocept.com>, efge <fg@nuxeo.com>,
> fdrake <fdrake@gmail.com>, janko <jh@comunit.de>,
> magnus <magnus.heino@home.se>, mj <mj@zopatista.com>,
> poster <gary@zope.com>, rdmurray <rdmurray@bitdance.com>,
> srichter <srichter@cosmos.phy.tufts.edu>, sspickle <steve@spvi.com>,
> stevea <steve@z3u.com>, tseaver <tseaver@palladion.com>,
> philikon <philikon@philikon.de>, garrett <garrett@mojave-corp.com>,
> tim_one <tim.one@comcast.net>, hdima <dima@hlabs.spb.ru>,
> anguenot <ja@nuxeo.com>
> 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
> Zopeorg-webmaster@zope.org
> 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