[Zope] css in filesystem based product
Andrew Milton
akm at theinternet.com.au
Thu Jul 21 03:19:35 EDT 2005
+-------[ Nicholas Wieland ]----------------------
| Hi *, I'm having issues developing a filesystem based product.
| The product loads correctly and I see my zpt, but I'm not able to apply a
| stylesheet.
| The product directory is under Zope-Instance/Products, I've created some
| directories where I put styles and templates - but changing this structure is
| no problem at all.
| I don't have the slightest idea on how I can hook the .css to the .zpt,
| probably the css must be "published" inside zope in some ways, but I don't know
| how.
| I'm using plain Zope, no Plone and no CMF. I've also tried to look how Plone
| does this but without any success (it's just too big ...).
Just pretend it's a DTML file..
from Globals import DTMLFile
cssName = DTMLFile('relative/path/main.css', globals())
name your file 'main.css.dtml'
then you can use;
<link rel="StyleSheet" href="cssName" type="text/css" />
--
Andrew Milton
akm at theinternet.com.au
More information about the Zope
mailing list