How can I generate my page breadcrumb, using web.sitemap, when my webpage can be accessed from multiple paths?

StackOverflow https://stackoverflow.com//questions/12652358

Question

I am using web.sitemap to generate breadcrumbs in my website, but I have a page that can be navigated using multiple paths.

Is there a way I can support multiple paths using web.sitemap? If not, what is the alternative?

Was it helpful?

Solution

a standard and valid web.sitemap can't have duplicate urls ,so

I can think of 3 solutions :

1- take one path as standard path and define that in your web.sitemap

2- another choice is to set SiteMapPath control's links urls programmatically based on how the user has came to the page .

3- and another solution could be using Url-rewriting . for each path that ends with this page create a separate url . this way you might could avoid duplicate urls

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top