menu with sitemap without parent node

Last post 11-04-2007 12:45 PM by ionafi. 2 replies.

Sort Posts:

  • menu with sitemap without parent node

    10-30-2007, 12:43 PM
    • Loading...
    • ionafi
    • Joined on 10-06-2007, 3:25 PM
    • Posts 71

    Hi there,

    I'm a little bit confused about this. I have a menu linked to a sitemap. What i want now is the vertical display of menu, the usual way of displaying vertical left menus, without child nodes, like all nodes would be parent without children. So far, looks like there is no way to use sitemap without one parent node which then splits. I dont want that. Is that he only way with sitemaps?

    That's what i want:

    Home

    Pubs

    Calendar

    I know i can do that just with menu control, but i want the breadcrumbs too, that's why i'm trying to make this work with sitemap.

    Thanks.

     

     

     

  • Re: menu with sitemap without parent node

    11-01-2007, 1:39 AM

    Hi,

    Base on your description, you want to display the menitems like root node, without the childnodes and the parent nodes, right?

    Because the sitemap file is an xml file, so it must have a root node in the sitemap file.

    But if you can set the sitemapdatasourse's ShowStartingNode is False, the root the node will not be displayed on the page, and you can set all the other node are at the same depth under the root node.

     Like below:

            <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1">
            </asp:Menu>
            <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" />

    Sitemap:

    <?xml version="1.0" encoding="utf-8" ?>
    <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
      <siteMapNode title="root" url="" >
         <siteMapNode title="Home Page" url="~/Index.aspx" />
         <siteMapNode title="Pubs" url="~/...." />
         <siteMapNode title="Calendar" url="~/..." />
      </siteMapNode>
    </siteMap>

    Hope it helps.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Yours sincerely,
    Amanda Wang
    Microsoft Online Community Support
  • Re: menu with sitemap without parent node

    11-04-2007, 12:45 PM
    Answer
    • Loading...
    • ionafi
    • Joined on 10-06-2007, 3:25 PM
    • Posts 71

    Thank you Amanda,

    That was exactly what i wanted. I didn't know about that attribute.

    Cheers.

Page 1 of 1 (3 items)
Microsoft Communities
Page view counter