Skip to content
CPyle edited this page Mar 29, 2012 · 5 revisions

Advanced Sitemap offers two simple extension points that developers creating custom sites can take advantage of.

ISitemapRouteFilter

Implementing this interface will allow you to filter out urls from appearing in both the XML and HTML sitemaps. Simply do your filtering and return false if a particular path shouldn't be considered.

ISitemapRouteProvider

Implementing this interface will allow you to supply the sitemap with additional routes. This is particularly useful if you have implemented lots of custom MVC routing into your solution and still wish to progrmatically generate your sitemap without having to create custom routes by hand.

Advanced Sitemap currently uses two route providers (Content & custom) that are configured via the admin. It would be completely possible to create your own route providers and offer your own administration for them in another tab.

Refreshing the sitemap cache

The sitemap is aggressively cached. Issuing the following signals via the Orchard ISignals interface will allow you to invalidate the cache:

"WebAdvanced.Sitemap.Refresh" - Issue this signal to rebuild the sitemap cache from all available route providers.

"sitemap.xml" - This signal will rebuild the XML sitemap result, and is usually issued once per day.

Clone this wiki locally