Menu control and a Sitemap

Last post 10-24-2007 11:32 AM by Diamsorn. 3 replies.

Sort Posts:

  • Menu control and a Sitemap

    10-24-2007, 10:57 AM
    • Member
      424 point Member
    • bendJoe
    • Member since 08-31-2007, 4:31 PM
    • Posts 465

    Shown below is my Sitemap file. I have two menu's one for the main navigation and the second for subnavigation.  So the main navigation shows an empty string ,Welcome,My Account,Admin,Service Ticket. And when you navigate to an item in the Main Menu the submenu will display the subnavigation part for example if you are at the Welcome in the Main Menu the submenu will show Password Recovery and New User. This much is working well. one problem I want to eliminate here is I dont want the main Menu menu to display the first node in the sitemap. See I have left the title to empty string, even after leaving it empty the menu is showing something in the background, as if something is  existing there. Is there a way I can instruct the menu not to display this node?

    "1.0" encoding="utf-8" ?>
    "http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    	<siteMapNode url="~/Login.aspx" title=""  description="Login page"&gt;
    		<siteMapNode url="~/Welcome/Default.aspx" title="Welcome"  description="Welcome page"&gt;
    		<siteMapNode url="~/Welcome/PasswordRecovery.aspx" title="Password Recovery" description="" />
    			<siteMapNode url="~/Welcome/Register.aspx" title="New User" description="" />
    	</siteMapNode>
    		<siteMapNode url="~/Home/Default.aspx" title="My Account"  description="Home page"&gt;
    			<siteMapNode url="~/Home/ChangePassword.aspx" title="Reset Password" description="Pending User Requests" />
    			
    		</siteMapNode>
    		<siteMapNode url="~/Admin/Default.aspx" title="Admin"  description="Home page"&gt;
    			<siteMapNode url="~/Admin/PendingUsers.aspx" title="Pending Users" description="Pending User Requests" />
    			<siteMapNode url="~/Admin/ManageUsers.aspx" title="Manage Users" description="Manage Users" />
    			</siteMapNode>
    		<siteMapNode url="~/ServiceTicket/Default.aspx" title="Service Ticket"  description="Service Tickets"&gt;
    			<siteMapNode url="~/ServiceTicket/Page1.aspx" title="Page1" description="New User Registration" />
    			<siteMapNode url="~/ServiceTicket/Page2.aspx" title="Page2" description="Recover Password" />
    			<siteMapNode url="~/ServiceTicket/Page3.aspx" title="Page3" description="">
    		
    	
    Thank You.
    
    
     
  • Re: Menu control and a Sitemap

    10-24-2007, 11:18 AM
    Answer
    • Contributor
      2,109 point Contributor
    • Diamsorn
    • Member since 08-04-2004, 5:37 PM
    • Texas
    • Posts 384
    In your SiteMapDataSource set

    ShowStartingNode="false"

    Dave Yancey
    My Blog
  • Re: Menu control and a Sitemap

    10-24-2007, 11:28 AM
    • Member
      424 point Member
    • bendJoe
    • Member since 08-31-2007, 4:31 PM
    • Posts 465

    Thanks,

    I did that and found out a weird result. Then I set the

    StaticDisplayLevels="1" previosly it was "2". on the menu,

    Now it works .

    Just wondering what  this  StaticDisplaylevels property does?

  • Re: Menu control and a Sitemap

    10-24-2007, 11:32 AM
    • Contributor
      2,109 point Contributor
    • Diamsorn
    • Member since 08-04-2004, 5:37 PM
    • Texas
    • Posts 384
Page 1 of 1 (4 items)