Randal L. Schwartz wrote:
"Kiffin" == Kiffin Gish <[EMAIL PROTECTED]> writes:
Kiffin> Not sure I understand. That q is a reference to the CGI object, so
Kiffin> what does it have to do with the template titles?
What is it that is looking at template.title? There's some code somewhere.
Randal, I believe you are referring to page.title in file 'site/html'
and page.about in file 'site/header'.
index.pl:
--------
my $tt = Template->new({
...
PRE_PROCESS => 'config/main',
WRAPPER => 'site/wrapper',
...
});
site/wrapper:
------------
[% SWITCH page.type;
...
CASE 'html';
content WRAPPER site/html
+ site/layout;
...
END;
-%]
site/html:
---------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>[% page.title %]</title>
<link rel="stylesheet" href="[% site.url.css %]/main.css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
[% content %]
</body>
</html>
site/layout:
-----------
<div id="header">
[% PROCESS site/header %]
</div>
...
site/header:
-----------
[% PROCESS site/logo %]
<h1>[% page.title %]</h1>
[% IF page.about -%]
<div class="about">
[% page.about %]
</div>
[% END -%]
...
Does this help?
--
Kiffin Gish
Development Team, Demon (THUS plc)
Postbus 15829
1001 NH Amsterdam
The Netherlands
T: +31 (0)20-422 20 00
F: +31 (0)20-422 20 01
M: +31 (0)6-21 83 68 28
http://www.demon.nl
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates