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

    <browser:viewlet
        name="plone.toolbar"
        for="*"
        manager="plone.app.layout.viewlets.interfaces.IPortalTop"
        class=".bbb.ToolbarViewlet"
        permission="plone.ViewToolbar"
        layer=".interfaces.IToolbarLayer"
        />

    <!-- BBB: Used to override/disable parts of Plone 4.x that
         should not be in place when using plone.app.Toolbar
         -->
    <browser:viewlet
        name="plone.contentviews"
        for="*"
        manager="plone.app.layout.viewlets.interfaces.IContentViews"
        permission="zope.Public"
        class=".bbb.NullViewlet"
        layer=".interfaces.IToolbarLayer"
        />

    <browser:viewlet
        name="plone.contentactions"
        for="*"
        manager="plone.app.layout.viewlets.interfaces.IContentViews"
        class=".bbb.NullViewlet"
        permission="zope.Public"
        layer=".interfaces.IToolbarLayer"
        />

    <browser:viewlet
        name="plone.personal_bar"
        for="*"
        manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
        class="plone.app.layout.viewlets.common.PersonalBarViewlet"
        template="bbb_personal_bar.pt"
        permission="zope2.View"
        layer=".interfaces.IToolbarLayer"
        />

    <browser:viewletManager
        name="plone.resourceregistries.kineticstylesheets"
        provides="Products.ResourceRegistries.interfaces.IHtmlHeadStyles"
        template="bbb_nullviewlet.pt"
        permission="zope2.View"
        layer=".interfaces.IToolbarLayer"
        />

    <genericsetup:registerProfile
        name="z_bbb"
        title="Plone Toolbar - Compatibility with Plone 4"
        description="Performs backwards compatibility migrations"
        directory="profiles/bbb"
        for="Products.CMFPlone.interfaces.IMigratingPloneSiteRoot"
        provides="Products.GenericSetup.interfaces.EXTENSION"
        />

</configure>
