<mode="head above parapet">
Actually, it really doesn't matter /where/ the Content Type is stored,
provided it's presented as part of the HTTP headers and not inline HTML. I
can see no reason by H::T must be tied solely to the generation of HTML, as
the whole "raison d'etre" of a templating system is that the output text is
separated from the code and stored in a template.
I could have a template along these lines and it could be perfectly
acceptable output from the corresponding CGI:
----cut--here--------cut--here--------cut--here----
Content-Type: text/html
<html>
<head><title>Hello, world</title></head>
<body><p>Hi everyone</p></body>
</html>
----cut--here--------cut--here--------cut--here----
#!/usr/bin/perl
use HTML::Template;
$n = HTML::Template->new(filename => "...");
print $n->output;
----cut--here--------cut--here--------cut--here----
Chris
--
Chris Davies, Manheim Online
Tel. 0113 393-2004 Fax. 0870 444-0482. Mobile 07778 199069
-----Original Message-----
From: Philip S Tellis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 14, 2001 8:29 AM
To: Boex,Matthew W.
Cc: HTML-Template mailing list
Subject: RE: [htmltmpl] dumb template/apache question
On Tue, 13 Nov 2001, Boex,Matthew W. wrote:
> is the header incorrect? should i print the content type in my script as
> opposed to being in the template?
You must always print the content type in the script whether you put it
in the template or not. The browser needs to know what content it is
reading _before_ it actually reads it. How else would it know whether
to render it as a html page, an image, or to load a plugin to display
it.
Philip
--
Trying to be happy is like trying to build a machine for which the only
specification is that it should run noiselessly.
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]