Personal tools
You are here: Home Documentation Manuals Plone Core Developer Reference Specific areas Navigation structures Constructing the sitemap
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

5.2.3. Constructing the sitemap

Up one level
How the sitemap is constructed

The sitemap is constructed using the same mechanisms as the navigation tree - it simply uses a different query builder and navtree strategy.

The view that is used by the sitemap.pt page template is found in CMFPlone.browser.sitemap.SitemapView, and implements CMFPlone.browser.interfaces.ISitemapView. It in turn delegates to the more general view CMFPlone.browser.navigation.CatalogSiteMap which implements CMFPlone.browser.interfaces.ISitemap. This does:

    def siteMap(self):
        context = utils.context(self)
        queryBuilder = SitemapQueryBuilder(context)
        query = queryBuilder()
        strategy = getMultiAdapter((context, self), INavtreeStrategy)
        return buildFolderTree(context, obj=context, query=query, strategy=strategy)

Note that the sitemap and navtree query builders and strategies share much code and are derived from one another.

There is a utilty method in CMFPlone.utils called createSiteMap() that invokes the ISitemap view. The deprecated way of constructing the sitemap is through a call to PloneTool.createNavTree setting sitemap=True.

by Martin Aspeli last modified April 18, 2006 - 15:08
Contributors: Martin Aspeli, Hanno Schlichting, Whit Morris
All content is copyright Plone Foundation and the individual contributors.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by