On 27-02-2009 at 16:17:37 Moritz Baumann <flamin...@online.de> wrote:

<html metal:define-macro="skeleton">
   <tal:block metal:define-slot="header" />
   <tal:block metal:define-slot="content" />

another file:
$phptal->setSource('<tal:block metal:use-macro="skeleton.html/skeleton">
   <div metal:fill-slot="header">Hello</div>
   <div metal:fill-slot="content">world</div>

Thanks, I hadn't thought about that possibility yet, though it only solves my problem for the simple case I've mentioned.

What if I wanted to have a box with static content e.g. in the sidebar of my blog now?

I'm not sure what you mean by static content here.

If you wanted to add sidebar, then you could add:

<div metal:define-slot="sidebar">Default sidebar content</div>

to skeleton, and add
<div metal:fill-slot="sidebar">Special sidebar</div>

to page templates that wish to override it.

regards, Kornel

PHPTAL mailing list

Reply via email to