On 8/11/11 2:48 PM, vii wrote:
Hello List

Sorry for bordering you again but I've been reading and trying and testing
for about 8 hours now and it seems that I'm to stupid to finish this rather
simple task (I beliefe).

I have a content type and want to give it its own css-File. I created the
css-File in the browser-folder "browser/mycontenttype_styles.css" and an
xml-file  "profiles/default/cssregistry.xml" with this content:

<?xml version="1.0"?>

   <stylesheet
     id="mycontenttye_styles.css" title=""
     media="all" rel="stylesheet" rendering="import"
     cacheable="True" compression="safe" cookable="True"
     enabled="1" expression="" />


But after I de-installed and re-installed the product in my plonesite if I
check the portal_css I always get the error message "(resource not found or
not accessible)" next to the line for this css-file.


While the XML snippet above adds the respective entry to the registry
it does NOT make that file available to Zope/Plone per se - which is
why you get the "resource not found" error.

In order to make the css file available in the first place you need
to register it as a browser resource as well.

See, e.g.,
http://plone.org/documentation/kb/customization-for-developers/zope-3-browser-resources
for how to do that.

HTH

        Raphael



regards
viktor

--
View this message in context: 
http://plone.293351.n2.nabble.com/Register-an-CSS-File-tp6676252p6676252.html
Sent from the Product Developers mailing list archive at Nabble.com.


_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers

Reply via email to