+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Site Panelbar

Site Panelbar

2 posts, 0 answered
  1. Sasa
    Sasa avatar
    17 posts
    Registered:
    24 Aug 2007
    27 May 2008
    Link to this post
    Hi,

    Is there a way to make Site Panelbar expanded by default beyond 1st level?

    I have something like this:

    -ROOT
        -LEVEL 1
            -LEVEL 2
            -LEVEL2
        -LEVEL 1
            -LEVEL 2
            -LEVEL 2
        -LEVEL 1

    I would like to have site panel bar expand all these levels by default, not just level1 as it does now.
  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    28 May 2008
    Link to this post
    Hello Sasa,

    You need to modify ~/Sitefinity/UserControls/Navigation/SitePanelbar.ascx control as follows:

    .ascx
    <script type="text/javascript"
     
       function ExpandAllItems() 
          { 
           var PanelBar = <%= RadPanelbar1.ClientID %>
            for (var i=0; i<PanelBar.AllItems.length; i++) 
               { 
                  var panelItem = PanelBar.AllItems[i]; 
                  panelItem.Expand(); 
               } 
          } 
    </script> 
     
    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false"/> 
    <radP:RadPanelbar ID="RadPanelbar1" runat="server" OnClientLoad="ExpandAllItems"  DataSourceID="SiteMapDataSource1" OnItemDataBound="RadPanelbar1_ItemDataBound" EnableViewState="false"
    </radP:RadPanelbar> 

    Hope this helps.

    Kind regards,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
2 posts, 0 answered