in reply to Learning Template::Toolkit - have I understood?
Are you generating static HTML pages, or writing templates that will have content populated by a cgi script?
tpage is just a simple script for wrapping the perl modules that generate html from a template.
ttree is similar, but works recursively over directories.
For generating dynamic content I found this tutorial helpful. I don't have time this morning to read over the devshed one, but it probably covers similar content.
If you want to generate static pages then one of the variables passed to the template can be the name of another template . The following command would generate the template, defining the 'content_file' variable with the value 'content/foo.html':
And in your template:tpage --define content_file=content/foo.html wrapper.html > > static- +foo.html
<html> ... [ INSERT $content_file ] ... </html>
|
|---|