Sometime on Sep 20, Sam Tregar assembled some asciibets to say:

> On Thu, 20 Sep 2001, Rustagi, Dhiraj wrote:
>
> > Thanks.. But then I have to use a CGI file to output this template file. Is
> > that right? So I will have to use SSI directive to execute a CGI program
> > which will then load this template.
>
> HTML::Template is generally used through CGI, yes.

Although I often run it through a cron -  static files are, after all,
faster to serve.  I also generate scheduled emails through the cron
using H::T.

To answer the OP's question, I often do use HTML::Template through CGI
in association with SSI.  I have code similar to this:

<!--#set expr="TITLE" value="Page Title" -->
<!--#include virtual=".header.shtml" -->
<table blah...>
<tr valign="top">
<td width="..">
<!--#include virtual=".left-menu.shtml" -->
</td>
<td width="~..">
<!--#set expr="VAR1" value="val1" -->
<!--#set expr="VAR2" value="val2" -->
<!--#set expr="VAR3" value="val3" -->
<!--#exec cmd="perl-with-H-T" -->
</td>
</tr>
</table>
<!--#include virtual=".footer.shtml" -->


Of course, VAR1, VAR2 and VAR3 are available to perl-with-H-T through
$ENV{'VAR1'}, $ENV{'VAR2'} and $ENV{'VAR3'}

voila, I've passed arguments to an included file, albeit not
conventionally.  I could also pass arguments to the perl program as
command line params, or a query string (if I use cgi instead of cmd),
but then I'd have to write the values directly instead of using VAR1,
VAR2...

Also, if you notice, .header.shtml uses $TITLE which is defined in each
file that includes it.

Philip

-- 
PL/I -- "the fatal disease" -- belongs more to the problem set than to the
solution set.
                -- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5


Visit my webpage at http://www.ncst.ernet.in/~philip/
Read my writings at http://www.ncst.ernet.in/~philip/writings/

  MSN  philiptellis                         Yahoo!  philiptellis
  AIM  philiptellis                         ICQ     129711328





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to