: Sitemap - following mvcsitemapprovider but categorization is confusing me I'm using mvcsitemapprovider for sitemap. http://mvcsitemap.codeplex.com/ public class StoreDetailsDynamicNodeProvider
I'm using mvcsitemapprovider for sitemap. mvcsitemap.codeplex.com/
public class StoreDetailsDynamicNodeProvider
: DynamicNodeProviderBase
{
MusicStoreEntities storeDB = new MusicStoreEntities();
public override IEnumerable<DynamicNode> GetDynamicNodeCollection()
{
// Build value
var returnValue = new List<DynamicNode>();
// Create a node for each album
foreach (var album in storeDB.Albums.Include("Genre"))
{
DynamicNode node = new DynamicNode();
node.Title = album.Title;
node.ParentKey = "Genre_" + album.Genre.Name;
node.RouteValues.Add("id", album.AlbumId);
returnValue.Add(node);
}
// Return
return returnValue;
}
}
this is the code on their website for registering dynamic website nodes. How do I modify this to adapt to my website's categorization is confusing me.
Here is the layout of my website:
home->approved->
education entertainment business
| | |
kid, teenager, adult kid, teenager, adult kid, teenager, adult
| | |
and so on.. and so on.. and so on..
home->not approved->
education entertainment business
| | |
kid, teenager, adult kid, teenager, adult kid, teenager, adult
| | |
and so on.. and so on.. and so on..
and only after going through so many levels, the entries come up.
what's confusing me is as you can see entries in my sitemap do not have one unique parent key. Even in the database, the way things are stored as is that each row of an entry in the database would know that it belongs to approved, entertainment, kid, etc... like below:
Entry1 | approved | education | kid | levelx | levely | levelz ...
how would one organize sitemap of something like that for sitemap?
Edit: I posted a similar question on stackoverflow, but I felt this may be more appropriate place.
More posts by @Tiffany637
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.