[ZPT] Varying templates based on location

Chris Withers chrisw@nipltd.com
Mon, 19 Aug 2002 09:36:05 +0100


Jean Jordaan wrote:
> 
> I think this should be cool though (in macro "page"):
> 
>  <div id="content" metal:define-slot="content">
>  <tal:block content="structure here/content.pt" />
>  </div>
> 
> That way, the 'content.pt' of 'here' is always the default content.
> Subpages can override.

Hmmm... you mean pages in subfolders where a different content.pt exists in that 
folder, right? ;-)

In the abvoe example, why not just have the contents of content.pt where you 
have that tal:block?

> Although .. unless 'content.pt' was big and ugly, and you particularly
> wanted to keep it out of your 'index_html' or whatever, you could just
> 'fill-slot' and provide the content right there, instead of having
> 'content.pt' everywhere .. right?

yup.

cheers,

Chris