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

    <!-- Register viewlet managers - used in plone's main_template -->

    <browser:viewletManager
        name="plone.htmlhead"
        provides=".interfaces.IHtmlHead"
        permission="zope2.View"
        />

    <browser:viewletManager
        name="plone.htmlhead.links"
        provides=".interfaces.IHtmlHeadLinks"
        permission="zope2.View"
        />

    <browser:viewletManager
        name="plone.portaltop"
        provides=".interfaces.IPortalTop"
        permission="zope2.View"
        class="plone.app.viewletmanager.manager.OrderedViewletManager"
        />

    <browser:viewletManager
        name="plone.portalheader"
        provides=".interfaces.IPortalHeader"
        permission="zope2.View"
        class="plone.app.viewletmanager.manager.OrderedViewletManager"
        />
        
    <browser:viewletManager
        name="plone.contentviews"
        provides=".interfaces.IContentViews"
        permission="zope2.View"
        class="plone.app.viewletmanager.manager.OrderedViewletManager"
        />

    <browser:viewletManager
        name="plone.abovecontent"
        provides=".interfaces.IAboveContent"
        permission="zope2.View"
        class="plone.app.viewletmanager.manager.OrderedViewletManager"
        />

    <browser:viewletManager
        name="plone.abovecontenttitle"
        provides=".interfaces.IAboveContentTitle"
        permission="zope2.View"
        class="plone.app.viewletmanager.manager.OrderedViewletManager"
        />

    <browser:viewletManager
        name="plone.documentactions"
        provides=".interfaces.IDocumentActions"
        permission="zope2.View"
        class="plone.app.viewletmanager.manager.OrderedViewletManager"
        />

    <browser:viewletManager
        name="plone.belowcontenttitle"
        provides=".interfaces.IBelowContentTitle"
        permission="zope2.View"
        class="plone.app.viewletmanager.manager.OrderedViewletManager"
        />

    <browser:viewletManager
        name="plone.abovecontentbody"
        provides=".interfaces.IAboveContentBody"
        permission="zope2.View"
        class="plone.app.viewletmanager.manager.OrderedViewletManager"
        />

    <browser:viewletManager
        name="plone.belowcontentbody"
        provides=".interfaces.IBelowContentBody"
        permission="zope2.View"
        class="plone.app.viewletmanager.manager.OrderedViewletManager"
        />

    <browser:viewletManager
        name="plone.belowcontent"
        provides=".interfaces.IBelowContent"
        permission="zope2.View"
        class="plone.app.viewletmanager.manager.OrderedViewletManager"
        />

    <browser:viewletManager
        name="plone.portalfooter"
        provides=".interfaces.IPortalFooter"
        permission="zope2.View"
        class="plone.app.viewletmanager.manager.OrderedViewletManager"
        />

    <!-- Define some viewlets -->

    <!-- The portal header -->
    <browser:viewlet
        name="plone.header"
        manager=".interfaces.IPortalTop"
        template="portal_header.pt"
        permission="zope2.View" 
        />

    <!-- The skip links for accessibility -->
    <browser:viewlet
        name="plone.skip_links"
        manager=".interfaces.IPortalHeader"
        class=".common.SkipLinksViewlet"
        permission="zope2.View" 
        />

    <!-- The site actions -->
    <browser:viewlet
        name="plone.site_actions"
        manager=".interfaces.IPortalHeader"
        class=".common.SiteActionsViewlet"
        permission="zope2.View" 
        />

    <!-- The search box -->
    <browser:viewlet
        name="plone.searchbox"
        manager=".interfaces.IPortalHeader"
        class=".common.SearchBoxViewlet"
        permission="zope2.View" 
        />

    <!-- The logo -->
    <browser:viewlet
        name="plone.logo"
        manager=".interfaces.IPortalHeader"
        class=".common.LogoViewlet"
        permission="zope2.View" 
        />

    <!-- The global sections -->
    <browser:viewlet
        name="plone.global_sections"
        manager=".interfaces.IPortalHeader"
        class=".common.GlobalSectionsViewlet"
        permission="zope2.View" 
        />

    <!-- The personal bar -->
    <browser:viewlet
        name="plone.personal_bar"
        manager=".interfaces.IPortalTop"
        class=".common.PersonalBarViewlet"
        permission="zope2.View" 
        />

    <!-- The breadcrumbs -->
    <browser:viewlet
        name="plone.path_bar"
        manager=".interfaces.IPortalTop"
        class=".common.PathBarViewlet"
        permission="zope2.View" 
        />

    <!-- Content views (tabs) -->
    <browser:viewlet
        name="plone.contentviews"
        manager=".interfaces.IContentViews"
        template="contentviews.pt"
        permission="zope2.View"
        />
    
    <!-- Content actions (menus) 
            The default version is a blank bar; the one with real menus is
            registered for the main view + folder contents only.
      -->
    <browser:viewlet
        name="plone.contentactions"
        for="*"
        manager=".interfaces.IContentViews"
        template="contentactions_blank.pt"
        permission="zope2.View"
        />
        
    <browser:viewlet
        name="plone.contentactions"
        for="*"
        view="plone.app.layout.globals.interfaces.IViewView"
        manager=".interfaces.IContentViews"
        class=".common.ContentActionsViewlet"
        permission="zope2.View"
        />
        
    <browser:viewlet
        name="plone.contentactions"
        for="*"
        view="plone.app.content.browser.interfaces.IFolderContentsView"
        manager=".interfaces.IContentViews"
        class=".common.ContentActionsViewlet"
        permission="zope2.View"
        />

    <!-- Render the browser title -->
    <browser:viewlet
        name="plone.htmlhead.title"
        manager=".interfaces.IHtmlHead"
        class=".common.TitleViewlet"
        permission="zope2.View" 
        />

    <!-- Render the workflow history -->
    <browser:viewlet
        name="plone.belowcontentbody.workflowhistory"
        manager=".interfaces.IBelowContentBody"
        class=".content.WorkflowHistoryViewlet"
        permission="zope2.View" 
        />

    <!-- Render the document actions -->
    <browser:viewlet
        name="plone.abovecontenttitle.documentactions"
        manager=".interfaces.IBelowContentBody"
        class=".content.DocumentActionsViewlet"
        permission="zope2.View" 
        />

    <!-- Render the document byline -->
    <browser:viewlet
        name="plone.belowcontenttitle.documentbyline"
        manager=".interfaces.IBelowContentTitle"
        class=".content.DocumentBylineViewlet"
        permission="zope2.View" 
        />

    <!-- Render the keywords -->
    <browser:viewlet
        name="plone.belowcontenttitle.keywords"
        manager=".interfaces.IBelowContentTitle"
        template="keywords.pt"
        permission="zope2.View" 
        />

    <!-- Render comments -->
    <browser:viewlet
        name="plone.comments"
        for="Products.CMFCore.interfaces.IContentish"
        manager=".interfaces.IBelowContent"
        view="..globals.interfaces.IViewView"
        class=".comments.CommentsViewlet"
        permission="zope2.View"
        />

    <!-- Render lock info -->
    <browser:viewlet
        name="plone.lockinfo"
        manager=".interfaces.IAboveContent"
        class="plone.locking.browser.info.LockInfoViewlet"
        permission="cmf.ModifyPortalContent"
        for="plone.locking.interfaces.ITTWLockable"
        />

    <!-- Render table of contents -->
    <browser:viewlet
        name="plone.tableofcontents"
        for="Products.ATContentTypes.interface.IATDocument"
        manager=".interfaces.IAboveContentBody"
        class=".common.TableOfContentsViewlet"
        permission="zope2.View" 
        />
        
    <!-- Footer -->
    <browser:viewlet
        name="plone.footer"
        for="*"
        manager=".interfaces.IPortalFooter"
        template="footer.pt"
        permission="zope.Public"
        />
        
    <!-- Colophon -->
    <browser:viewlet
        name="plone.colophon"
        for="*"
        manager=".interfaces.IPortalFooter"
        template="colophon.pt"
        permission="zope.Public"
        />

</configure>
