[Templates] CGI/TT vs SSI

Mark Mills mark@xodiax.com
Wed, 8 Oct 2003 15:12:37 -0400


> -----Original Message-----
> From: Eric Siegerman [mailto:erics@telepres.com]
> Subject: Re: [Templates] CGI/TT vs SSI
>=20
> On Wed, Oct 08, 2003 at 02:29:36PM +0200, Tosh Cooey wrote:
> > Hi, I'm currently using a mix of static HTML and TT driven CGI.
> >=20
> > I want to streamline some things, especially using a=20
> standard menu based on an=20
> > XML file.
> >
> > Two approaches:
> >   1. put SSI's in both static HTML and templates
> >   2. turn the static HTML into templates, in order to be able
> >      to use "[% PROCESS menu %]" in them
>  3. Truly six-of-one-half-dozen-of the other: Use SSI's in the
>     static pages, but PROCESS directives in the templates:
>  4. Preprocess the menu into static HTML, as Leo suggested.
>  5. Turn the static pages into templates, as in (2), but then
>     preprocess them back into static HTML with ttree or custom
>     Perl.

6. Maybe you could modify the TT handler so that when it is called
through a sub-request under Apache, it returns the just the raw
body without any TT wrapping or headers. Then you could SSI the
menu.tt2 and have just that part processed by TT.

Dunno how hard that would be but being able to include HTML
fragments from TT in non TT pages would be pretty nice.

--mark mills
Xodiax Engineering