attractive menu's using sitemap

Discussion in 'ASP .Net' started by mocsoft, Aug 29, 2006.

  1. mocsoft

    mocsoft Guest

    Does anyone know how to use the sitemap file to generate attractive
    menus other than those specified in Visual Web Developer (menu,
    treeview). The menu control seems to always group the menu items
    together in one top node, theres bound to be a way around this surely??


    Any help much appreciated
     
    mocsoft, Aug 29, 2006
    #1
    1. Advertising

  2. mocsoft

    Kbalz Guest

    I'm using XMLSiteMapProvider, and asp:Menu

    In your aspx page where you want the Menu, when you define the
    SiteMapDataSource, be sure to have the ShowStartingNode="false" - that
    might solve your second problem

    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server"
    ShowStartingNode="false" />

    <asp:Menu1 DataSourceID="SiteMapDataSource1" runat="server"
    ......

    And the site map should look something like

    <?xml version="1.0" encoding="utf-8" ?>
    <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <siteMapNode title="TOPLEVELNODE" description="THIS NODE WILL HIDE">
    <siteMapNode title="Home" url="~/default.aspx">
    <siteMapNode title="Logon" url="~/logon/default.aspx" />
    <siteMapNode title="Sign Up" url="~/logon/signUp.aspx" />
    </siteMapNode><!-- End "Home" Node-->
    </siteMapNode><!-- End top level Node-->
    </siteMap>

    Using menu should then look like this:

    Home ----
    |--- Logon
    |--- Sign Up

    Hope that helps,


    mocsoft wrote:
    > Does anyone know how to use the sitemap file to generate attractive
    > menus other than those specified in Visual Web Developer (menu,
    > treeview). The menu control seems to always group the menu items
    > together in one top node, theres bound to be a way around this surely??
    >
    >
    > Any help much appreciated
     
    Kbalz, Aug 29, 2006
    #2
    1. Advertising

  3. mocsoft

    mocsoft Guest

    Thats exactly what I was wanting, thanks very much for the help!

    Kbalz wrote:
    > I'm using XMLSiteMapProvider, and asp:Menu
    >
    > In your aspx page where you want the Menu, when you define the
    > SiteMapDataSource, be sure to have the ShowStartingNode="false" - that
    > might solve your second problem
    >
    > <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server"
    > ShowStartingNode="false" />
    >
    > <asp:Menu1 DataSourceID="SiteMapDataSource1" runat="server"
    > .....
    >
    > And the site map should look something like
    >
    > <?xml version="1.0" encoding="utf-8" ?>
    > <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    > <siteMapNode title="TOPLEVELNODE" description="THIS NODE WILL HIDE">
    > <siteMapNode title="Home" url="~/default.aspx">
    > <siteMapNode title="Logon" url="~/logon/default.aspx" />
    > <siteMapNode title="Sign Up" url="~/logon/signUp.aspx" />
    > </siteMapNode><!-- End "Home" Node-->
    > </siteMapNode><!-- End top level Node-->
    > </siteMap>
    >
    > Using menu should then look like this:
    >
    > Home ----
    > |--- Logon
    > |--- Sign Up
    >
    > Hope that helps,
    >
    >
    > mocsoft wrote:
    > > Does anyone know how to use the sitemap file to generate attractive
    > > menus other than those specified in Visual Web Developer (menu,
    > > treeview). The menu control seems to always group the menu items
    > > together in one top node, theres bound to be a way around this surely??
    > >
    > >
    > > Any help much appreciated
     
    mocsoft, Aug 30, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. empire5
    Replies:
    1
    Views:
    603
    =?Utf-8?B?UmVuZ2E=?=
    Jan 11, 2007
  2. fitz
    Replies:
    0
    Views:
    283
  3. hsfd cvxbfd
    Replies:
    0
    Views:
    99
    hsfd cvxbfd
    Dec 5, 2010
  4. hsfd cvxbfd
    Replies:
    0
    Views:
    109
    hsfd cvxbfd
    Dec 5, 2010
  5. tnhoe
    Replies:
    0
    Views:
    172
    tnhoe
    Jun 28, 2005
Loading...

Share This Page