S
sean.marchetti
Hello,
I am having a little difficulty coming up with a solution for the
following requirement and I was hoping somebody might be able to offer
some help. I need to create a SiteMapPath for a category system that
supports any number of nested categories. Here's what I mean:
Category A
Category B
Category C
Category D
Category E
This information is stored in a single Categories table in my database
and looks like this:
Id ParentId Name
------------------------------------------------------
1 NULL Category A
2 1 Category B
3 2 Category C
4 NULL Category D
5 4 Category E
If the user was on the details page for Category C, the SiteMapPath
should display Home > Category A > Category B > Category C and the user
should be able the backtrack through the nested structure.
I know that I can create a custom SiteMapProvider that can use a
database as its data source, but I am not sure if this is the right
way. Any feedback would be highly appreciated. Thanks!
I am having a little difficulty coming up with a solution for the
following requirement and I was hoping somebody might be able to offer
some help. I need to create a SiteMapPath for a category system that
supports any number of nested categories. Here's what I mean:
Category A
Category B
Category C
Category D
Category E
This information is stored in a single Categories table in my database
and looks like this:
Id ParentId Name
------------------------------------------------------
1 NULL Category A
2 1 Category B
3 2 Category C
4 NULL Category D
5 4 Category E
If the user was on the details page for Category C, the SiteMapPath
should display Home > Category A > Category B > Category C and the user
should be able the backtrack through the nested structure.
I know that I can create a custom SiteMapProvider that can use a
database as its data source, but I am not sure if this is the right
way. Any feedback would be highly appreciated. Thanks!