[Templates] CGI/TT vs SSI
Tosh Cooey
tosh@1200group.com
Wed, 08 Oct 2003 14:29:36 +0200
Hi, I'm currently using a mix of static HTML and TT driven CGI.
I want to streamline some things, especially using a standard menu based on an
XML file.
What I'm after is efficiency, so my question is which is the most efficient way
to do what I want.
The SSI approach would have to parse all .html as well as all .pl :
.html
<html>
stuff...
<!--#include virtual="/menu.cgi" -->
</html>
.tt/.cgi
<html>
stuff...
[% TTfun %]
<!--#include virtual="/menu.cgi" -->
</html>
The CGI/TT approach would have to treat all HTML documents as templates:
http://www.website.com/getFile.cgi?myDocument.tt
myDocument.tt
<html>
stuff...
[% TTfun %]
[% PROCESS menu %]
</html>
.tt/.cgi
<html>
stuff...
[% TTfun %]
[% PROCESS menu %]
</html>
After reading some of the things that Randall has suggested I was thinking about
making the "menu" static, but then I have to rebuild after every change, and
also lose a bit of dynamism.
I'm running a mod_perl environment.
Is this just a case of; "six of one, one-half dozen of the other" or is forcing
a Template->process call on hapless static HTML, just to put in a menu, a bit of
overkill?
THANKS!!!
Tosh
--
Tosh Cooey
Twelve Hundred Group
http://www.1200group.com/