[ZPT] Content-type on PageTemplateFile
Fri, 25 Jan 2002 11:01:16 +0000 (UTC)
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 <email@example.com> wrote:
> 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
> Thomas Olsen
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 10 http://nuxeo.com mailto:firstname.lastname@example.org