use Template Toolkit for plain .html files?
Right now I have a s开发者_JAVA百科ite that uses Perl and Template Toolkit (using the Template
module) for pages that require calculation and/or database access but regular HTML files for the the rest of the pages. However, I have discovered that it would be nice if I had access to templating goodness for even the "plain HTML" pages, if only for the convenience of "including" standard headers and footers, etc.
What is the easiest way to introduce this with the least amount of disruption to the current site? (i.e. I would prefer not to have to change all the filenames and links).
The two approaches that spring to my mind are:
- Process the static files off-line using ttree
- Write some sort of mod_perl hander to run all .html files through TT before outputting
精彩评论