Migrating to v2.0: SiteMapPath behaves like SiteMapTitle

Jun 22, 2010 at 10:29 PM
Edited Jun 22, 2010 at 10:36 PM

Hi,

I tried migrating to version 2.0, but something weird has happened to the SiteMapPath output. In stead of a breadcrumb trail, I just get the name of the current node, and sometimes just a blank.

This is my Sitemap Mvc.sitemap:

I made the following changes:

  • renamed SiteMap to mvcSiteMap
  • changed the xmlns
  • removed the old isDynamic attribute
<?xml version="1.0" encoding="utf-8" ?>
<mvcSiteMap xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-2.0" enableLocalization="true">
  <mvcSiteMapNode title="Home" area="" controller="home" action="index">
    <mvcSiteMapNode title="Over ons" area="" controller="home" action="about" />

    <mvcSiteMapNode title="Groepen" area="groups" action="index" controller="Group" />
      
  
    <mvcSiteMapNode title="Account" controller="account">
      <mvcSiteMapNode title="Inloggen" controller="Account" action="logon" />
      <mvcSiteMapNode title="Registreren" controller="account" action="register" />
      <mvcSiteMapNode title="Wachtwoord veranderen" controller="account" action="changepassword" />
      <mvcSiteMapNode title="Uitloggen" controller="account" action="logoff" />
    </mvcSiteMapNode>
  </mvcSiteMapNode>
</mvcSiteMap>

I deleted the old provider and registered the new one, so the system on itself IS working. I did not make any syntax errrors.

I call the breadcrumbs:

<%=Html.MvcSiteMap().SiteMapPath()%>

And, for example when going to the "Groupen" (groups) node I get this output:

<span class="siteMapPath"><span class="link">Groepen</span></span>

This should have been "Home > Groepen".

So you couldsay it behaves like SiteMapTitle. Does anyone have a clue why?

 EDIT: I just set SecurityTrimmingEnabled to false and it solved everything.

I am rather curious why SecurityTrimmingEnabled hides so many nodes? That can't be right, can it?

Coordinator
Jun 23, 2010 at 1:59 PM

Should work as you described. Is there any Authorize attribute on your controller or action?