Geoff

Geoff

  • NA
  • 1
  • 1.6k

Modifying Service provider to determine which sitemap links to display

Apr 6 2011 11:42 AM
I have created a custom XML Sitemap provider which checks each siteMapNode in my web.sitemap file for the "visible" attribute.  If this is false then the node does not get printed.  Now I have been requested to put a breadcrumb trail into the site for navigation purposes.  Unfortunately it automatically uses the same sitemap provider and when the node is not visible, the sitemappath control doesn't show anything.

My question is how can I use the httpcontext object to determine whether the control requesting the sitemapnode is the asp.net menu or the asp.net sitemappath control?

If that is not possible, how would I override the render in the menu control to not display if the visible attribute on the node is false?  Either approach would work fine for my site.

Thanks,
Geoff