in reply to Re: Learning Template::Toolkit - have I understood?
in thread Learning Template::Toolkit - have I understood?
I like the idea of pre-generation of static html pages for the clarity, the server load.
You might consider Template caching (see "Caching and Compiling Options") as a easy solution for that issue.
To my mind, this seems a little backwards, since a large template-driven site is rarely going to be the first case, and much more commonly going to be the second case. No?
If you're converting to TT from a HTML-only design, yes, it's backwards. And that's not something TT was designed for; it's mostly built for ground-up design with TT in mind.
So, first off, you can indicate that TT "scoop up" .html files, or any other content. The INCLUDE_PATH option will contain a list of directories to look in, and you can write a quickie "generator" for it to recurse through your directory structure if you'd like, or manually list the directories; it's your choice. Make a "base" template, use the WRAPPER option, and then the "sub-templates" with the content get slugged in via the [% content %] tag. I strongly recommend skimming the various parts of the Template Manual; there is a LOT of power to the Template Toolkit that's not obvious, and it not "typical usage", as you've surmised.
Does that help?
----Asim, known to some as Woodrow.