[ZPT] Varying templates based on location / 'here' vs 'template'
Chris Withers
chrisw@nipltd.com
Tue, 20 Aug 2002 16:58:55 +0100
This feels distinctly buggy to me :-(
Chris
Jean Jordaan wrote:
> Michael Long wrote:
>
>> <div id="banner">
>> <div metal:fill-slot="banner">
>> <div tal:content="structure here/banner.pt">banner here</div>
>> </div>
>> </div>
>
>
> Hmm, one detail: if you do this, then 'banner.pt' is evaluated in the
> context of where it's found, which can be good, or bothersome, depending
> on what you want ..
>
> To remove clutter from my template, I moved the contents of the
> <head> tag into a seperate template called 'head.pt'. Baaad idea.
>
> /root (title: "")
> **template.pt
> <head tal:content="structure here/head.pt"></head>
> **head.pt (title: "Head")
> <title tal:content="here/title" />
>
> /root/subfolder (title: "Subfolder")
> **index_html (title: "A Document")
>
> - Rendering 'index_html' in 'head.pt' gets '<title><title>' :(
>
> - Using 'template/title' in 'head.pt' gets '<title>Head<title>' :(
>
> - When I put 'head.pt' back into 'template.pt', I got
> '<title>Subfolder</title>' :/
>
> - Using 'template/title' gets the desired
> '<title>A Document</title>' :)
>