[Zope] External CSS via ZPTs

Shane McChesney shane@nooro.com
Sat, 29 Jun 2002 10:48:42 -0400


I'd like to use a CSS stylesheet editable within the Zope=
 Management 
Interface, and refer to it from a LINK tag in the HEAD of each=
 page. 

I'm just learning Zope, and trying to stick to ZPTs over DTML 
wherever possible.

I searched Zope.org, and found mindlace's post of a "CSS & Zope 
howto" in 1999.

It talks about using the LINK tag to incorporate external CSS=
 that is 
still an editable Zope object, exactly what I want, but it's a=
 DTML 
object, and I'm not sure how to replicate this line in a ZPT:

From: http://www.zope.org/Members/mindlace/css_zope
----------------------------------------------
IMPORTANT: You must have the following line as the first line of=
 your 
method:

<dtml-call "RESPONSE.setHeader('Content-Type', 'text/css')">
----------------------------------------------

How can I have a ZPT act as my external stylesheet and set that 
response header? That is, how do I emulate the dtml-call above in=
 a 
ZPT?

Thanks,

Shane McChesney
http://www.skippingdot.net