<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
    xmlns:browser="http://namespaces.zope.org/browser"
    xmlns:i18n="http://namespaces.zope.org/i18n"
    i18n_domain="ftw.contentmenu">

    <!-- Register the installation GenericSetup extension profile -->
    <genericsetup:registerProfile
      name="default"
      title="ftw.contentmenu"
      directory="profiles/default"
      description="Customize Plone's content menu"
      provides="Products.GenericSetup.interfaces.EXTENSION"
      />

    <include package=".upgrades" />

    <!-- Remove workflow menu by overriding it with an unavailable menu -->
    <adapter
        for="* ftw.contentmenu.interfaces.IFtwContentmenuSpecific"
        name="plone.contentmenu.workflow"
        factory="ftw.contentmenu.menu.WorkflowSubMenuItem"
        provides="plone.app.contentmenu.interfaces.IContentMenuItem"
        />

    <!-- Register our custom actions menu -->
    <adapter
        for="* ftw.contentmenu.interfaces.IFtwContentmenuSpecific"
        name="plone.contentmenu.actions"
        factory="ftw.contentmenu.menu.CombinedActionsWorkflowSubMenuItem"
        provides="plone.app.contentmenu.interfaces.IContentMenuItem" />

    <!-- Register our custom add... menu -->
    <adapter
        for="* ftw.contentmenu.interfaces.IFtwContentmenuSpecific"
        name="plone.contentmenu.factories"
        factory="ftw.contentmenu.menu.FactoriesSubMenuItem"
        provides="plone.app.contentmenu.interfaces.IContentMenuItem" />

    <browser:menu
        id="ftw_contentmenu_actions"
        title="Combined actions- and workflow-menu"
        class="ftw.contentmenu.menu.CombinedActionsWorkflowMenu"
        />

    <browser:menu
        id="ftw_contentmenu_factory"
        title="The 'add' menu - allows the user to add new content items in the context"
        class="ftw.contentmenu.menu.FactoriesMenu"
    />

</configure>
