Thanks!  I've never used dtml for style sheets.  I've always used page
templates and never had a problem 'til now.  Also, I don't see a way to
set the content type on a dtml doc or method.  I assume it would be
text/html and then I back in the same boat.  To restate my problem,
FireFox in HTML 4.01 Strict mode does not seem to accept a style sheet
if the content type is text/html.  It needs to see text/css.  (Of course
IE is fat dumb and happy)  Everything worked fine until I added this doc
string to my page:


Unless somebody has some better magic this seems work.

context.REQUEST.RESPONSE.setHeader('content-type', 'text/css')
return context.stylesheet()

This way I can leave the content type on the page template text/html so
Zope is happy and make FireFox happy by overriding the content type to


> -----Original Message-----
Of Paul Winkler
> Sent: Thursday, March 31, 2005 12:00 PM
> To:
> Subject: Re: [Zope] Dynamic Zope Style Sheets with HTML 4.01 Strict
> On Thu, Mar 31, 2005 at 11:38:59AM -0600, Andy Yates wrote:
> > Am I going to have to write a python script to call the style sheet
> > template and change the content type or is there a better way to
> > this?
> Page Templates are awkward to use for non-XML output. I never tried
> to use them for stylesheets.
> fwiw, I have good results using DTML Methods for my dynamic
> It's about the only thing I use DTML for anymore.
> Mine look roughly like this:
> <dtml-with SomethingThatGivesMeABunchOfProperties>
> body {
>       background-color: &dtml-mainBackgroundColor;;
>       color: &dtml-mainTextColor;;
> }
> /* more style rules follow */
> ...
> </dtml-with>
> --
> Paul Winkler
> _______________________________________________
> Zope maillist  -
> **   No cross posts or HTML encoding!  **
> (Related lists -
> )
Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to