Archive for August, 2008|Monthly archive page

Hiding your dependencies

A few days ago Wichert showed me something interesting. You can hide profiles / products from both the quickinstaller and the Plone site creation screen. This came in handy for a project we were working on.

The project is for a client that delivers a customized version of a product we developed for them. So each of their clients receives a tailored version (think branding, default settings etc.).

Code wise this means we have a base package for all installaties. On top of this we built the branded versions. To minimize installation problems the possibility to hide dependent products came in really handy.

Hiding products can be done by registering two utilities. One for disabling products in the quickinstaller. The other for disabling extension profiles from the Plone site creation.

To register these utilities add something like this your configure.zcml:

<utility factory=".profile.HiddenProducts" name="my.special.project" />
<utility factory=".profile.HiddenProfiles" name="my.special.project" />

Now create a file in your project and add the following lines:

from zope.interface import implements
from Products.CMFQuickInstallerTool.interfaces import INonInstallable as INonInstallableProducts
from Products.CMFPlone.interfaces import INonInstallable as INonInstallableProfiles

class HiddenProducts(object):

def getNonInstallableProducts(self):
return [

class HiddenProfiles(object):

def getNonInstallableProfiles(self):
return [