This is a migrated thread and some comments may be shown as answers.

Kendo.MVC.SiteMapManager and MVC Areas

2 Answers 84 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Cool Breeze
Top achievements
Rank 1
Cool Breeze asked on 21 Mar 2014, 01:03 AM
If I am using a standard asp.net sitemap and registering it using SiteMapManager.SiteMaps.Register, is there any way to specify areas in the site map? I've tried using area="areaname" and that doesn't seem to be working.

Thanks!

2 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 24 Mar 2014, 12:56 PM
Hello,

Could you provide a sample project that demonstrates the issue with the area attribute? The SiteMapBinding demo in the offline sample application uses areas:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
  <siteMapNode title="Home" controller="Home" action="Overview">
    <siteMapNode title="Grid">
      <siteMapNode controller="grid" action="index" title="First Look (Razor)" area="razor"/>
      <siteMapNode controller="grid" action="index" title="First Look (ASPX)" area="aspx"/>
      <siteMapNode controller="grid" action="editing" title="Batch editing (Razor)" area="razor"/>
      <siteMapNode controller="grid" action="editing" title="Batch editing (ASPX)" area="aspx"/>
      <siteMapNode controller="grid" action="from-table" title="Initialization from table (Razor)" area="razor"/>
      <siteMapNode controller="grid" action="from-table" title="Initialization from table (ASPX)" area="aspx"/>
    </siteMapNode>
    <siteMapNode title="Menu">
      <siteMapNode controller="menu" action="index" title="First Look (Razor)" area="razor"/>
      <siteMapNode controller="menu" action="index" title="First Look (ASPX)" area="aspx"/>
      <siteMapNode controller="menu" action="events" title="Events (Razor)" area="razor"/>
      <siteMapNode controller="menu" action="events" title="Events (ASPX)" area="aspx"/>
      <siteMapNode controller="menu" action="api" title="API (Razor)" area="razor"/>
      <siteMapNode controller="menu" action="api" title="API (ASPX)" area="aspx"/>
      <siteMapNode controller="menu" action="images" title="Images (Razor)" area="razor"/>
      <siteMapNode controller="menu" action="images" title="Images (ASPX)" area="aspx"/>
    </siteMapNode>
  </siteMapNode>
</siteMap>
and the links seems to be correctly generated at least on my side.

Regards,
Daniel
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Cool Breeze
Top achievements
Rank 1
answered on 24 Mar 2014, 05:27 PM
Thanks for the reply Daniel. I'm sure I was just doing something wrong. I actually went back to not having areas so I don't have a sample of the issue I was seeing handy but if I do try and do areas again in the future I'll make sure to check out that demo, thanks for pointing me in that direction!
Tags
General Discussions
Asked by
Cool Breeze
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Cool Breeze
Top achievements
Rank 1
Share this question
or