Hi; I want my titles to render automatically. But even the default code in the 2.6 distro for *standard_template.pt* doesn't work: <html metal:define-macro="page"> <head> <metal:block define-slot="head"> <title tal:content="template/title">The Title</title> </metal:block> </head> <body> <div metal:define-slot="body"> This is where the page's body text goes. </div> </body> </html> This renders an empty string for *title*. Why? TIA, beno
beno wrote:
Hi; I want my titles to render automatically. But even the default code in the 2.6 distro for *standard_template.pt* doesn't work:
<html metal:define-macro="page"> <head> <metal:block define-slot="head"> <title tal:content="template/title">The Title</title> </metal:block> </head> <body> <div metal:define-slot="body"> This is where the page's body text goes. </div> </body> </html>
This renders an empty string for *title*. Why?
Hi, <title tal:content="template/title">The Title</title> renders the title of the template. You want the title of the current "context": <title tal:content="here/title">The Title</title> ~~~~ \mj
At 10:38 AM 1/5/2003 +0100, you wrote:
beno wrote:
Hi; I want my titles to render automatically. But even the default code in the 2.6 distro for *standard_template.pt* doesn't work: <html metal:define-macro="page"> <head> <metal:block define-slot="head"> <title tal:content="template/title">The Title</title> </metal:block> </head> <body> <div metal:define-slot="body"> This is where the page's body text goes. </div> </body> </html> This renders an empty string for *title*. Why?
Hi,
<title tal:content="template/title">The Title</title>
renders the title of the template. You want the title of the current "context":
<title tal:content="here/title">The Title</title>
Well, that makes sense, but it's not working either. I want the equivalent of <dtml-var title_or_id> Right now I'm getting an empty string. More ideas? TIA, beno
beno wrote:
Hi,
<title tal:content="template/title">The Title</title>
renders the title of the template. You want the title of the current "context":
<title tal:content="here/title">The Title</title>
Well, that makes sense, but it's not working either. I want the equivalent of <dtml-var title_or_id> Right now I'm getting an empty string. More ideas? TIA, beno
Then you may use <title tal:content="here/title_or_id">The Title</title> -- Mikhail 'Xen' Kashkin
participants (3)
-
beno -
Maik Jablonski -
Mikhail