Question

I have added a site map path control to a master page and set up the sitemap file as required, but when I click on multiple links it only shows the current and the home page eg, pathHome --> Movies where as it should be Home --> Movies --> Clothes --> etc.. Also when I go to the cust sign up and administration pages the path doesn't how at all.

Can someone explain how to fix this problem as I can't see where I have gone wrong with implementing it?

The sitemap:

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <siteMapNode url="~/Home.aspx" title="Home"  description="Main site page">
        <siteMapNode url="~/Movies.aspx" title="Movies"  description="Movie store" />
        <siteMapNode url="~/Games.aspx" title="Games"  description="Games store" />
        <siteMapNode url="~/Clothes.aspx" title="Clothes"  description="Clothes Store" />
        <siteMapNode url="~/CustomerSignUp.aspx" title="Customer Sign-Up"  description="Customer sign up page" />
        <siteMapNode url="~/Login.aspx" title="Sign-In"  description="Sign In page" />
        <siteMapNode url="~/ForgotPassword.aspx" title="Forgot Password"  description="Forgot password" />
        <siteMapNode url="~/ContactUs.aspx" title="Contact Us"  description="Contact details.." />
        <siteMapNode url="~/Administration.aspx" title="Administration"  description="Admin Folder" />
    </siteMapNode>
</siteMap>

site path

Was it helpful?

Solution

You need to wrap up child sitemapnodes in parent sitemapnode,

<siteMapNode url="~/Home.aspx" title="Home"  description="Main site page">
       <siteMapNode url="~/Movies.aspx" title="Movies"  description="Movie store">
           <siteMapNode url="~/Clothes.aspx" title="Clothes"  description="Clothes Store" />
       </siteMapNode>   
</siteMapNode>

For further understanding, refer this article.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top