This question is locked. New answers and comments are not allowed.
Niels Schneider
Top achievements
Rank 1
Niels Schneider
asked on 25 Feb 2010, 09:31 AM
Hi,
Is there support in the extensions (Sitemap) for ASP.Net MVC 2 Areas. If so a code example would be appreciated. Using a route in a XmlSiteMapNode results in a null ref exception.
I'm using VS2010 RC2.
Kind regards,
Niels
Is there support in the extensions (Sitemap) for ASP.Net MVC 2 Areas. If so a code example would be appreciated. Using a route in a XmlSiteMapNode results in a null ref exception.
I'm using VS2010 RC2.
Kind regards,
Niels
4 Answers, 1 is accepted
0
Accepted
Hi Niels Schneider,
Area support will be added in the next drop. You will define the xml site map with the following:
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Area support will be added in the next drop. You will define the xml site map with the following:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
<siteMapNode title="Home">
<siteMapNode title="Main" controller="Home" action="Index">
<routeValues>
<area/>
</routeValues>
</siteMapNode>
<siteMapNode title="Area" controller="AreaHome" action="Index">
<routeValues>
<area>MyArea</area>
</routeValues>
</siteMapNode>
</siteMapNode>
</siteMap>
Sincerely yours,
Kazi Manzur Rashid
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Niels Schneider
Top achievements
Rank 1
answered on 02 Mar 2010, 09:03 AM
Hello Kazi,
Thank you for your answer. Your solution works already in the 2010 Futures release.
The implementation isn't making the the sitemap more readable however. it would be nicer to have an additional attribute in the siteMapNode which is added to the routeValues by to framework. Like this:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
<siteMapNode title="Home">
<siteMapNode title="Main" controller="Home" action="Index" area=""/>
<siteMapNode title="Area" controller="AreaHome" action="Index" area="MyArea"/>
</siteMapNode>
</siteMap>
Kind Regards,
Niels
ps. I'm missing your blog entries for a while. Are you gona write something soon?
Thank you for your answer. Your solution works already in the 2010 Futures release.
The implementation isn't making the the sitemap more readable however. it would be nicer to have an additional attribute in the siteMapNode which is added to the routeValues by to framework. Like this:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
<siteMapNode title="Home">
<siteMapNode title="Main" controller="Home" action="Index" area=""/>
<siteMapNode title="Area" controller="AreaHome" action="Index" area="MyArea"/>
</siteMapNode>
</siteMap>
Kind Regards,
Niels
ps. I'm missing your blog entries for a while. Are you gona write something soon?
0
Hello Niels Schneider,
Okay Area has been promoted to node level as per your suggestion.
re: You will see something interesting soon in my blog.
Best wishes,
Kazi Manzur Rashid
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Okay Area has been promoted to node level as per your suggestion.
re: You will see something interesting soon in my blog.
Best wishes,
Kazi Manzur Rashid
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Niels Schneider
Top achievements
Rank 1
answered on 02 Mar 2010, 11:52 AM
Kazi,
Nice. Thank you.
Keep an eye on your blog.
Kind Regards,
Niels
Nice. Thank you.
Keep an eye on your blog.
Kind Regards,
Niels