[ZPT] Content-type on PageTemplateFile

Thomas Olsen tol@tanghus.dk
Sat, 26 Jan 2002 07:24:11 +0100


Oh yes - me being stupid ;-)

Actually what I was thinking but didn't mention was something like filesystem 
python scripts:

<!--
## PageTemplate "my_template"
##attributes=content_type=text/plain,expand=0
##title=My Template
-->

Just a thought...

On Friday 25 January 2002 16:54, Evan Simpson wrote:
> Thomas Olsen wrote:
> > Is it in anyway possible programmatically to set the 'content_type' on a
> > PageTemplateFile?
>
> Sure.  In the Python code that creates the PTF, do like so:
>
> myptf = PageTemplateFile(...)
> myptf.content_type = 'text/funky'
>
> Cheers,
>
> Evan @ Zope
>
>
>
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt

-- 
Regards
Thomas Olsen

http://www.tanghus.dk