Sorry, It seems to be the other way round:

*layouts/default.pt:*
<html xmlns="http://www.w3.org/1999/xhtml";
   xmlns:tal="http://xml.zope.org/namespaces/tal";
   xmlns:metal="http://xml.zope.org/namespaces/metal";>
<span metal:define-macro="content">
 <div id="content">
  <span metal:define-slot="content">content</span>
 </div>
</span>
<p>misc in default</p>
</html>

*index.pt:*
 <html xmlns="http://www.w3.org/1999/xhtml";
       xmlns:tal="http://xml.zope.org/namespaces/tal";
       xmlns:metal="http://xml.zope.org/namespaces/metal";>
   <span metal:use-macro="default.macros['content']">
     <span metal:fill-slot="content">Hello from ZPT</span>
   </span>
   <p>misc in index</p>
 </html>

The rendered page shows "Hello from ZPT" and "misc in index" ("misc in 
default" is ignored). Which reflects exactly what the code states.

So one would have to invert the calling of the templates. Instead declaring 
"index.pt" as the view's renderer, I'd declare "layouts/default.pt". And the 
view provides template "index.pt" in the data, e.g. as key "content".
Can that be?


-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to