Hi Sean,
The way I normally approach this is to have a PRE_PROCESS config
file which does something like this:
[% page = {
headers = [ ]
}
%]
Then in the main template, or a template called from it, you can
write:
[% page.headers.push('<script .../>') %]
The final trick is to use a WRAPPER template to add the outer HTML
wrapper. This gets added after the main template is processed. So
the page.headers will already be set by the inner template(s) by
the time you come to generate the headers:
<html>
<head>
[% FOREACH header IN page.headers;
header;
END
%]
</head>
<body>
[% content %]
</body>
</html>
HTH
A
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates