MvcSiteMap fails to render menu child's

Feb 18, 2011 at 9:21 AM
Edited Feb 18, 2011 at 5:27 PM


Im using iss 7 with mvc 3 and the MvcSiteMap from the latest source code.

Not every menu child renders in the menu with <%= Html.MvcSiteMap.Menu()%>

if i remove the mvcSiteMapNode named test3,test4,test5 then everything renders the problem occurred when i created more then one level in the mvcSiteMapNode named test.

when the menu renders it ignores those levels with the problem and renders the next ones.

Edit: I added the url to the site map nodes and now every child renders i think the problem is some were when the framework is building the url for test2,test3,test4,test5.

<?xml version="1.0" encoding="utf-8" ?>
<mvcSiteMap xmlns="" enableLocalization="true">
    <mvcSiteMapNode title="start" controller="Home" action="Index">

      <mvcSiteMapNode title="test" controller="test" action="Index">
        <mvcSiteMapNode title="test2" controller="test2" action="Index">
          <mvcSiteMapNode title="u1" controller="u1" action="u1" />
          <mvcSiteMapNode title="u2" controller="u2" action="u2" />
          <mvcSiteMapNode title="u3" controller="u3" action="u3" />
          <mvcSiteMapNode title="u4" controller="u4" action="u4" />

        <mvcSiteMapNode title="test3" controller="test3" action="test3">
          <mvcSiteMapNode title="b1" controller="b1" action="b1" />
          <mvcSiteMapNode title="b2" controller="b2" action="b2" />
          <mvcSiteMapNode title="b3" controller="b3" action="b3" />
          <mvcSiteMapNode title="b4" controller="b4" action="b4" />
          <mvcSiteMapNode title="b5" controller="b5" action="b5" />
          <mvcSiteMapNode title="b6" controller="b6" action="b6" />
          <mvcSiteMapNode title="b7" controller="b7" action="b7" />

        <mvcSiteMapNode title="test4" controller="test4" action="test4" />

        <mvcSiteMapNode title="test5" controller="test5" action="Index">
          <mvcSiteMapNode title="g1" controller="g1" action="g1" />
          <mvcSiteMapNode title="g2" controller="g2" action="g2" />


      <mvcSiteMapNode title="test6" controller="test6" action="test6">
        <mvcSiteMapNode title="test7" controller="test7" action="test7" />

        <mvcSiteMapNode title="test8" controller="test8" action="Index">
          <mvcSiteMapNode title="h1" controller="h1" action="h1" />
          <mvcSiteMapNode title="h2" controller="h2" action="h2" />
          <mvcSiteMapNode title="h3" controller="h3" action="h3" />

        <mvcSiteMapNode title="test9" controller="test9" action="test9" />


      <mvcSiteMapNode title="test10" controller="test10" action="test10" />
      <mvcSiteMapNode title="test11" controller="test11" action="test11" />

      <mvcSiteMapNode title="test12" controller="test12" action="test12">
        <mvcSiteMapNode title="j1" controller="j1" action="j1"></mvcSiteMapNode>
        <mvcSiteMapNode title="j2" controller="j2" action="j2"></mvcSiteMapNode>

      <mvcSiteMapNode title="test13" controller="test13" action="test13">
        <mvcSiteMapNode title="o1" controller="o1" action="o1" />
        <mvcSiteMapNode title="o2" controller="o2" action="o2" />