Adding a Skins Folder to a Product
All those super-powered developers out there like to put all their theme stuff in the browser directory of a product and wire it all up as Zope 3 components. For us mere mortals, using a skin layer is still much more accessible. However paster doesn't create this for you, so here's how to do it.
Add the Directories
At the same level as browser, portlets and content add a skins directory, and then within it a layer directory - e.g.
Register the Directory as a File System Directory View
At the same level as browser, portlets etc create a skins.zcml file with the following content:
<configure xmlns="http://namespaces.zope.org/zope" xmlns:cmf="http://namespaces.zope.org/cmf" > <!-- File System Directory Views registration --> <cmf:registerDirectory name="job_templates"/> </configure> and then include this in the configure.zcml file at that same level: <include file="skins.zcml" />
Make sure the skin layer gets installed
In the profiles/default directory add a file skins.xml
<?xml version="1.0"?> <object name="portal_skins"> <object name="job_templates" meta_type="Filesystem Directory View" directory="[your namespace].[your product name]:skins/job_templates"/> <skin-path name="*"> <layer name="job_templates" insert-after="custom"/> </skin-path> </object>
You'll need to re-start to check this is all working. Then go to portal_skins and see if you've got a directory called job_templates and, click the properties tab, to see if that directory name has been inserted in the skin layers.