Need Help:EPiServer MenuList.Ineed a menu with drop down submenu.

Vote:
 

 The following is the menu.ascx code.

<EPiServer:MenuList runat="server" ID="Menu">
    <HeaderTemplate>
        <ul id="MainMenu">
    </HeaderTemplate>
    <ItemTemplate>
        <li>
            <EPiServer:PageList runat="server" ID="PageList1" DataSource="<%#Container.CurrentPage.PageLink %> ">
                <ItemTemplate>
                    <li>
                        <EPiServer:Property ID="Property1" PropertyName="PageLink" runat="server" />
                    </li>
                </ItemTemplate>
            </EPiServer:PageList>
        </li>
    </ItemTemplate>
    <FooterTemplate>
        </ul>
    </FooterTemplate>
</EPiServer:MenuList>

 The following is Menu.ascx.cs

protected override void OnLoad(System.EventArgs e)
        {
            base.OnLoad(e);          
            Menu.PageLink = PageReference.StartPage;           
            Menu.PageLoader.GetChildrenCallback = new HierarchicalPageLoader.GetChildrenMethod(LoadChildren);
            Menu.DataBind();
        }

        /// <summary>
        /// Creates the collection for the main menu, adding the startpage
        /// </summary>
        private PageDataCollection LoadChildren(PageReference pageLink)
        {
            PageDataCollection pages = DataFactory.Instance.GetChildren(pageLink);
            pages.Insert(0, DataFactory.Instance.GetPage(pageLink));
            return pages;
        }

        /// <summary>
        /// Gets or sets the MenuList for this control
        /// </summary>
        public MenuList MenuList
        {
            get { return Menu; }
            set { Menu = value; }
        }

 

pls help.Thanks in advance.I am getting all the menu items in a single list,Including sub menu

#30375
Jun 13, 2009 7:48
Vote:
 

I have used the jQuery plugin "Superfish" together with an EPiServer-generated unordered list to create a drop-down menu, and it looks quite nice and works well. Have a look how to apply it to your code here:

http://users.tpg.com.au/j_birch/plugins/superfish/

 

#30385
Jun 14, 2009 20:14
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.