[ZPT] Content-type on PageTemplateFile

Florent Guillaume fg@nuxeo.com
Fri, 25 Jan 2002 11:01:16 +0000 (UTC)

Hi Thomas,

This works for me:

   <p tal:define="dummy python:request.RESPONSE.setHeader('Content-Type', 'text/plain')">

Even with the Page Template defined as text/html, this renders as text/plain.


Thomas Olsen  <tol@tanghus.dk> wrote:
> Hi
> Is it in anyway possible programmatically to set the 'content_type' on a 
> PageTemplateFile? I have tried to override it using RESPONSE.setHeader(...) 
> but to no avail - it only works when I set the property from the ZMI.
> Its in a CMF site so I guess I could program some logic which copies the 
> template to the custom folder and sets the property but it seems very 
> unelegant.
> -- 
> Regards
> Thomas Olsen
> http://www.tanghus.dk
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 10  http://nuxeo.com  mailto:fg@nuxeo.com