views:

73

answers:

0

I just did downloaded it from codeplex http://mvcsitemap.codeplex.com/ and can’t make it work properly, there is no so good samples around.

I need to display sitemap sections depending on action. Should i define multiple sitemaps, in such case the question is how to pass this paths to SiteMap control dynamically

File 1:

<siteMap>
  <siteMapNode>
    <siteMapNode title="Public Pages">
      <siteMapNode title="Page 1">
        <siteMapNode title="Page 1" action="Page1" controller="PublicPages"/>
        <siteMapNode title="Page 2" action="Page2" controller="PublicPages"/>
        <siteMapNode title="Page 3" action="Page3" controller="PublicPages"/>
      </siteMapNode>
     </siteMapNode>
   </siteMapNode>
</siteMap>

File 2:

<siteMap>
  <siteMapNode>
   <siteMapNode title="Home">
      <siteMapNode action="Index" controller="Home" title="Home" description="Home Page" />
      <siteMapNode action="About" controller="Home" title="About" description="About Page" />
   </siteMapNode>
   <siteMapNode title="Account" description="Account Information" roles="User">
   <siteMapNode action="ChangePassword" controller="Account" title="Change Password" description="Change Password" />
  </siteMapNode>    
</siteMap>

Otherwise should i have only one sitemap file and different sections within, in that case the question is how to say to control to display particular sections of the site map?

<siteMap>
  <siteMapNode>
<siteMapNode title="Public Pages">
  <siteMapNode title="Page 1">
    <siteMapNode title="Page 1" action="Page1" controller="PublicPages"/>
    <siteMapNode title="Page 2" action="Page2" controller="PublicPages"/>
    <siteMapNode title="Page 3" action="Page3" controller="PublicPages"/>
  </siteMapNode>
</siteMapNode>
<siteMapNode title="Home">
  <siteMapNode action="Index" controller="Home" title="Home" description="Home Page" />
  <siteMapNode action="About" controller="Home" title="About" description="About Page" />
</siteMapNode>
<siteMapNode title="Account" description="Account Information" roles="User">
  <siteMapNode action="ChangePassword" controller="Account" title="Change Password" description="Change Password" />
  </siteMapNode>    
</siteMap>

May be someone may provide any samples for this case?