Myk Melez wrote:
The Template Toolkit is a Perl templating module designed for making web sites. It supports both static content (similar to how the current mozilla.org web site works) and dynamic content (f.e. Bugzilla and Doctor front-ends are both dynamically generated from TT templates)...
Can it handle bug 227847 -- i.e. importing different sidebars for different pages?
Yes, for example we can create a wrapper template that wraps each page with a default sidebar whose filename is stored in a variable, using the DEFAULT directive to set the variable to the default only if it hasn't already been defined:
[% DEFAULT sidebar_template = "global-sidebar.html.tmpl" %]
<html>
<head>
<title>[% page.title %]</title>
</head>
<body>
[% PROCESS $sidebar_template %]
[% content %]
</body>
</html>Pages, which get processed before wrapper templates, can then override the default sidebar with their own custom one by setting the variable to something else:
[% sidebar_template = "my-sidebar.html.tmpl" %]
-myk _______________________________________________ mozilla-documentation mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-documentation
