Skin-Ordner für Bilder und Styles
abgelegt unter:
Plone,
Produkterstellung
Erstellen und einbinden eines Ordners für Bilder, CSS, JavaScript usw. in einem Produkt.
$ cd my.product/my/product
$ mkdir -p skins/my_product_images
$ mkdir -p skins/my_product_styles
skins.zcml
+ <configure
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:cmf="http://namespaces.zope.org/cmf"
+ i18n_domain="my.produkt">
+ <!-- File System Directory Views registration -->
+ <cmf:registerDirectory name="my_produkt_images"/>
+ <cmf:registerDirectory name="my_produkt_styles"/>
+ </configure>
configure.zcml
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:five="http://namespaces.zope.org/five"
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
i18n_domain="my.product">
...
<!-- Include the sub-packages that use their own configure.zcml files. -->
...
+ <include file="skins.zcml" />
...
</configure>
profiles/default/skins.xml
+ <?xml version="1.0"?>
+ <object name="portal_skins">
+ <object name="my_produkt_images"
+ meta_type="Filesystem Directory View"
+ directory="my.produkt:skins/my_produkt_images"/>
+ <object name="my_produkt_styles"
+ meta_type="Filesystem Directory View"
+ directory="my.produkt:skins/my_produkt_styles"/>
+ <skin-path name="*">
+ <layer name="my_produkt_images"
+ insert-after="custom" />
+ <layer name="my_produkt_styles"
+ insert-after="my_produkt_images" />
+ </skin-path>
+ </object>