SiteMapProvidercan be total dynamic. For example, it can perform a dynamic search for nodes only. Unlike StaticSiteMapProvider, you should know the whole structure. So, it is for you to decide what to choose.
You can see XmlSiteMapProviderthis is a good example of a static map provider.
public class CoolMapProvider : StaticSiteMapProvider
{
public override SiteMapNode BuildSiteMap()
{
var root = new SiteMapNode(this, "test", "~/test.aspx");
base.AddNode(root, null);
base.AddNode(new SiteMapNode(this, "test-child", "~/test_child.aspx"), root);
return root;
}
}
I have not tested this, but should work.
source
share