Al,

I work with a lot of old code that uses the method Marty exmplained.  The
problem I have had with it is that a few years after the original code was
written I find myself rewriting it to use HTML::Templates so that I can
include standard headers/footers and take advantage of the other
HTML::Template features.  As far as using this method over HTML::Template
you need to be able to predict future expansion to your code (which may be
impossible), and as long as you won't need other features (or don't mind
rolling your own) then Marty's is as good as any (and possibly preferable in
certain situations).

Rob

-----Original Message-----
From: Marty Landman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 05, 2002 12:32 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: cgi in the middle of HTML page


At 11:09 AM 2/5/02 -0500, you wrote:
>I want to have a web page where a CGI generated table appears in the
>midst of a bunch of standard HTML. I already have the table data being
>pulled from a database & generating a layout that looks good. however,
>I would prefer not to generate the entire page in code if possible.

Al,

Besides the packages and SSI approaches you can also

--  create a template file that has the table location marked, e.g. 
###TABLE-DATA###
--  have the program read the template file, generate the table output and 
then output it like so

my $tableData = &tableData();
my $page = &getTemplate();
for ($page) {s/###TABLE-DATA###/$tableData/}
print &httpHdrs();
print $page;

This has the advantages of

--  separating the tagging from the code so the designer can still work 
with the template, and even display the results on a browser w/o the table
data
--  being easier to implement as a first introduction to learning tools 
like Mason


hth,

Marty


SIMPL(tm) Content Management & WebSite Creation
http://face2interface.com/Home/Demo.shtml
Complementary Color Picker
http://face2interface.com/WebSafe


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

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

Reply via email to