[RESOLVED]Sitemap with multiple nodes sharing a single child node

I’ve a sitemap like the one given below:

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="~/Views/Home.aspx" title="Home" description="Home">
<siteMapNode url="~/Views/Accounts.aspx" title="Accounts" description="" />
<siteMapNode url="~/Views/Sales.aspx" title="Sales" description="" />
<siteMapNode url="~/Views/HR.aspx" title="HR" description="" />
<siteMapNode url="~/Views/IT.aspx" title="IT" description="" />
</siteMap>

Now All these level 1 nodes have "Details.aspx" as the child node. If I put another sitemapNode with url="Details.aspx" as I do not have any query string, I get an error that same URL cannot be used for multiple nodes.

Any idea as how to solve this issue?

you can give each one a query string that doesn’t do anything e.g. url="Details.aspx?page=1" url="Details.aspx?page=2"

not a very nice solution but I don’t think there is another way to do it

Using this approach, I’m able to migrate to details page but breadcrumbs disappear. 

Hi Arushi ,

here is my code ,it has breadcrums. :

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <siteMapNode url="~/Views/Home.aspx" title="Home" description="Home">
    <siteMapNode url="~/Views/Accounts.aspx" title="Accounts" description="">
      <siteMapNode url="~View/A.aspx?page=1" title="A"/>
    </siteMapNode>
    <siteMapNode url="~/Views/Sales.aspx" title="Sales" description="">
      <siteMapNode url="~View/A.aspx?page=2" title="A"/>
    </siteMapNode>
    <siteMapNode url="~/Views/HR.aspx" title="HR" description="">
      <siteMapNode url="~View/A.aspx?page=3" title="A"/>
    </siteMapNode>
    <siteMapNode url="~/Views/IT.aspx" title="IT" description="">
      <siteMapNode url="~View/A.aspx?page=4" title="A"/>
    </siteMapNode>
  </siteMapNode>
  </siteMap>
 <asp:SiteMapDataSource id="nav1" runat="server" />
<form runat="server">
<asp:Menu runat="server" DataSourceId="nav1" BackColor="#E3EAEB" DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#666666" StaticSubMenuIndent="10px" >
    <DynamicHoverStyle BackColor="#666666" ForeColor="White" />
    <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
    <DynamicMenuStyle BackColor="#E3EAEB" />
    <DynamicSelectedStyle BackColor="#1C5E55" />
    <StaticHoverStyle BackColor="#666666" ForeColor="White" />
    <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
    <StaticSelectedStyle BackColor="#1C5E55" />
    </asp:Menu>
</form>

Best Regards,

Kevin Shen.

Leave a Reply