A
Alexander Walker
Hello
I am using a custom site map provider to create a site map populated from a
database.
I am using the SiteMapPath control to display "bread crumbs" on the pages of my
site.
The database is divided into categories, each category contains items, there are
thousands of categories and tens of thousands of items. Correct me if I am
mistaken, but, I think that creating a site map that contains all of the
categories and all of the items in the database would not be feasible, so I have
limited the number of categories to the top three levels and excluded all items
from the site map, the remaining categories are pulled from the database as
needed.
The SiteMapPath Control produces output similar to the following line when a
certain URL is accessed
Category 1 / Sub Category 2 / Sub Category 3
The site map path above could be produced by using a URL such as the following
category.aspx?category=1&subcategory=2&childcategory=3
Each category page displays a list of items. The user can choose to select an
item to inspect it's details. The resultant URL would look like this
detail.aspx?category=1&subcategory=2&childcategory=3&item=1
At this point the SiteMapPath control does not display anything. I have tried
adding a dummy item entry to the site map that matches the following URL
detail.aspx?category=1&subcategory=2&childcategory=3
But this makes no difference. I was thinking of creating a customised
SiteMapPath Control that removed the "item" portion of the query string from the
URL so that it is treated like the dummy item that was set up in the site map,
but I can't figure out where to start, what method or property to override. Is
it possible to extend the behaviour of the SiteMapPath so that it will recognise
URLs that match only part a URL contained in the site map?
What can I do to cause the SiteMapPath control to display bread crumbs in a
situation where the actual URL does not exist in the sitemap, the URL I want to
match with is similar to URLs that are in the site map, are there any wild cards
that can be used when specifying the URL of sitemap entries?
Thanks
Alex
I am using a custom site map provider to create a site map populated from a
database.
I am using the SiteMapPath control to display "bread crumbs" on the pages of my
site.
The database is divided into categories, each category contains items, there are
thousands of categories and tens of thousands of items. Correct me if I am
mistaken, but, I think that creating a site map that contains all of the
categories and all of the items in the database would not be feasible, so I have
limited the number of categories to the top three levels and excluded all items
from the site map, the remaining categories are pulled from the database as
needed.
The SiteMapPath Control produces output similar to the following line when a
certain URL is accessed
Category 1 / Sub Category 2 / Sub Category 3
The site map path above could be produced by using a URL such as the following
category.aspx?category=1&subcategory=2&childcategory=3
Each category page displays a list of items. The user can choose to select an
item to inspect it's details. The resultant URL would look like this
detail.aspx?category=1&subcategory=2&childcategory=3&item=1
At this point the SiteMapPath control does not display anything. I have tried
adding a dummy item entry to the site map that matches the following URL
detail.aspx?category=1&subcategory=2&childcategory=3
But this makes no difference. I was thinking of creating a customised
SiteMapPath Control that removed the "item" portion of the query string from the
URL so that it is treated like the dummy item that was set up in the site map,
but I can't figure out where to start, what method or property to override. Is
it possible to extend the behaviour of the SiteMapPath so that it will recognise
URLs that match only part a URL contained in the site map?
What can I do to cause the SiteMapPath control to display bread crumbs in a
situation where the actual URL does not exist in the sitemap, the URL I want to
match with is similar to URLs that are in the site map, are there any wild cards
that can be used when specifying the URL of sitemap entries?
Thanks
Alex