RadMenu Layout

3 posts, 0 answers
  1. gimi
    gimi avatar
    3 posts
    Member since:
    Aug 2006

    Posted 10 May 2010 Link to this post

    I am using RadMenu in Sitefinity as the navigation menu. I am curious to know if RadMenu can be configured to support the layout from the attached picture? Any solution?

    Cheers,
    GiMi
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 11 May 2010 Link to this post

    Hi Gimi,

    One suggestion to achieve the appearance is integrating RadPanelBar with RadMenu.This demo shows one such approach where RadMenu is embedded in the ItemTemplate of the panel items.

    PanelBar And Menu

    -Shinu.

  3. gimi
    gimi avatar
    3 posts
    Member since:
    Aug 2006

    Posted 11 May 2010 Link to this post

    Hi Shinu,

    Thanks for the message.

    I ended up creating a new user control with the following code on page load event:
            if (!Page.IsPostBack) 
            { 
                foreach (CmsSiteMapNode node in SiteMap.RootNode.ChildNodes) 
                { 
                    RadPanelItem radPanelItem = new RadPanelItem(node.GetCmsPage().MenuName, node.GetCmsPage().StaticUrl); 
                    if (node.HasChildNodes) 
                    { 
                        RadMenu radMenu = new RadMenu(); 
                        radMenu.Width = Unit.Percentage(100); 
                        radMenu.Flow = ItemFlow.Vertical; 
                        SiteMapDataSource ds = new SiteMapDataSource(); 
                        ds.StartFromCurrentNode = false
                        ds.ShowStartingNode = false
                        ds.StartingNodeUrl = node.GetCmsPage().StaticUrl; 
                        radMenu.DataSource = ds; 
                        radMenu.DataBind(); 
                        radPanelItem.Controls.Add(radMenu); 
                    } 
                    radPB.Items.Add(radPanelItem); 
                } 
            } 

    Cheers,
    GiMi
Back to Top