I’ve seen a few common questions about the Site Navigation
feature from folks at conferences and in blogs that I thought would be worth
quickly answering:
>>> Question: With the
default XML File Provider can you use a filename other than web.sitemap to
store your site map information?
Answer: Yes. The filename used with
the XML File Provider can be specified in your web.config file (the default
name we configure is web.sitemap). This MSDN
article shows how to-do this (among other things).
>>> Question: With the
default XML File Provider can you partition your site map definition across
multiple files (for example: have a site map file stored in a sub-directory of
the site that defines the sitemap makeup of just that sub-directory)?
Answer: Yes – that is pretty easy
to-do. This MSDN
article shows how to-do this.
>>> Question: Is it
possible to filter what nodes are visible in the site-map based on the security
role permissions of the current user visiting the site (for example: hide those
nodes that they don’t have access to)?
Answer: Yes. This MSDN
article show how to-do this.
>>> Question: Is it
possible to dynamically add nodes into a site-map (for example: for forum or
blog post listings underneath a leaf node) without having to write a custom
SiteMapProvider?
Answer: Yes. This MSDN
Article and this blog
post discuss how to-do this.
>>> Question: Can you
localize site-maps (for example: have German and English content).
Answer: Yes. This MSDN
article shows how to-do this.
>>> Question: Can you
define a site map definition in something other than an XML file (for example:
instead use a database?).
Answer: Yes. The Site Navigation
system is provider based, which means that you can use any custom provider
implementation to define the site-map hierarchy. What is even cooler, is that
you can optionally use multiple providers together – for example: use the XML
provider for the overall structure, but maybe a blog specific provider that
goes against a blog database to populate the nodes dynamically underneath a
portion of the site.
Jeff Prosise also has a cool sample that he talks about here on
how to build a SiteMapProvider that retrieves the sitemap structure from a
database rather than the default XML file provider. This MSDN
article also links to a bunch of content on building your own SiteMap
provider.
The next version of SharePoint (which is heavily integrated
on top of ASP.NET 2.0) will also include a SharePoint specific Site Navigation
provider that dynamically populates the site-map with the content contained
within a SharePoint site.
Hope this helps,
Scott