ZCML File
configure.zcml

<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:apidoc="http://namespaces.zope.org/apidoc"
    xmlns:browser="http://namespaces.zope.org/browser"
    xmlns:zcml="http://namespaces.zope.org/zcml"
    i18n_domain="zope"
    >
<view
    for="*"
    name="preferences"
    provides="zope.traversing.interfaces.ITraversable"
    type="*"
    factory=".preference.preferencesNamespace"
    />
<adapter
    factory=".preference.preferencesNamespace"
    provides="zope.traversing.interfaces.ITraversable"
    for="*"
    name="preferences"
    />
<adapter
    factory=".preference.UserPreferences"
    provides=".interfaces.IUserPreferences"
    for="zope.location.interfaces.ILocation"
    />
<preferenceGroup
    id=""
    title="User Preferences"
    />
<browser:page
    class=".browser.EditPreferenceGroup"
    for=".interfaces.IPreferenceGroup"
    permission="zope.Public"
    name="index.html"
    template="index.pt"
    />
<browser:page
    class=".browser.EditPreferenceGroup"
    for=".interfaces.IPreferenceGroup"
    permission="zope.Public"
    name="editAsSubGroup"
    template="subgroup.pt"
    />
<class
    class=".default.DefaultPreferenceProvider"
    >
<require
    permission="zope.ManageSite"
    interface=".interfaces.IDefaultPreferenceProvider"
    />
</class>
<view
    for=".interfaces.IDefaultPreferenceProvider"
    name="preferences"
    provides="zope.interface.Interface"
    type="*"
    factory=".default.DefaultPreferences"
    />
<browser:addMenuItem
    title="Default User Preferences Provider"
    description="A Default User Preferences Provider"
    permission="zope.ManageSite"
    class=".default.DefaultPreferenceProvider"
    />
<browser:page
    class=".browser.PreferencesMacros"
    allowed_interface="zope.interface.common.mapping.IItemMapping"
    for="*"
    permission="zope.View"
    name="preferences_macros"
    />
<browser:page
    for="*"
    permission="zope.View"
    name="preference_macro_definitions"
    template="macros.pt"
    />
<browser:page
    class=".browser.PreferencesTree"
    for=".interfaces.IPreferenceGroup"
    permission="zope.View"
    name="tree"
    attribute="tree"
    />
<apidoc:bookchapter
    id="preferences"
    title="User Preferences API"
    doc_path="README.txt"
    zcml:condition="have apidoc"
    />
</configure>