Hi!

I use Debian/GNU Linux 3.1 and Apache::Tenplate for web development.
I try to change Content-Type of my page, for example to text/plain. For this i 
try this template:

==test.tt2==
[% request.content_type = "text/plain" %]
content type is [% request.content_type %].<br><br>plain text
====

after execute this script in my browser i see:
==browser==
content type is text/plain.

plain text
====

Content-type is text/html!
Which I do wrong? After reading
http://template-toolkit.org/pipermail/templates/2004-April/006079.html
I think, than this would be work fine...

My apache config (little part, dealing with template-toolkit)
==httpd.conf==
PerlModule              Apache::Request
PerlModule              Apache::Template
PerlModule              Apache::DBI

# set various configuration options, e.g.
TT2Headers              type
TT2Params               request
TT2Trim                 On
TT2PreChomp             On
TT2PostChomp            On
TT2EvalPerl             On
TT2Absolute             Off
TT2Relative             Off
TT2IncludePath          /var/www/ipcom

# now define Apache::Template as a PerlHandler, e.g.
<Files *.tt2>
    SetHandler      perl-script
    PerlHandler     Apache::Template
</Files>
====

My versions:
ii  libapache-template-perl   0.09-1
ii  libtemplate-perl          2.14-1
ii  libapache-request-perl    1.1-0.1
ii  apache                    1.3.33-6


Thank you!

-- 
WBW, AmadiS, System administrator of IP-COM

_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to