Hi all,
I've been using H::T for some time for simple stuff but I'm using it
for something more complicated now. What I'd like to do is have one
site-wide header template that gets included from individual pages
receive a variable from the individual page's template.
Something like:
site-wide.tmpl:
<table>
<tr>
<td>(Title of subpage)</td>
</tr>
....
</table>
Then individual pages have this:
<html>
<body>
<TMPL_INCLUDE NAME="header.tmpl">
...
</body>
</html>
Now what I'd like to do is set a variable in the individual page
containing the "nice" title of the page. I don't want to set that
name from code (it's a generic handler that basically calls H::T->new
and sticks in some user properties. Ideally, I'd like to be able to
set a variable in the individual page and do this in site-wide.tmpl:
<table>
<tr>
<td><TMPL_VAR NAME="title"></td>
</tr>
....
</table>
And set the value for "title" in the individual page's template:
<html>
<body>
<TMPL_SET_VAR title="abc">
<TMPL_INCLUDE NAME="header.tmpl">
...
</body>
</html>
From the perldoc, I can't find it and searching the mailing list
won't work ("Unable to contact search server" etc.). A quick browse
did reveal some info but not quite something as simple as I need now :)
Thanks,
Bas.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Html-template-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/html-template-users