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

Forums / Designing with Sitefinity / Selected Style in a Site Panelbar

Selected Style in a Site Panelbar

2 posts, 0 answered
  1. Chad
    Chad avatar
    19 posts
    Registered:
    11 Sep 2008
    20 Nov 2008
    Link to this post
    Hi,

    I am creating a navigation menu using the Site Panelbar.  Based on my experimenting and reading up on navigation, it seems like the best option for what I want it to do.

    I have overrode the built-in styling to use my own styling.  Everything works great except that when I'm on a specific page, the selected page doesn't stay highlighted.  I've tried various solutions, but I'm stumped.  Can this be done with the Site Panelbar?

    Example:
    I was playing around with this demo page:
    http://demo.sitefinity.com/Admissions/ApplyingFAQ.aspx

    I see that it uses a Site Panelbar and it keeps the page you are on highlighted.  When I view the source, it seems like the highlighting may be addressed by this:

    {"ctl00_LeftNavigation_ctl00_RadPanelbar1_p0":{"Selected":true,"Value":"Applying - FAQ"},

    On my page, I there is some similar script to specify the selected item, but it doesn't specify the actual control.  Could that be the problem?

    "value":"Contact Us","selected":true,"expanded":true}

    I am using version 3.5 SP1.  Is there any other information I can provide to help out?

    Thank you in advance.

    Chad




  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    21 Nov 2008
    Link to this post
    Hi Chad,

    You can use the SitePanelBar to achieve desired functionality. You need to apply you custom .css class to the SitePanelBar.

    Here is an example.

    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="SitePanelbar.ascx.cs" Inherits="UserControls_SitemapPanelbar" %> 
    <%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %> 
     
    <style type="text/css">  
    .rpRootGroup .rpSelected .rpText   
    {  
    background-color:#EBF1D0;  
    }  
    </style> 
    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false"/>  
    <telerik:RadPanelBar ID="RadPanelbar1" runat="server" DataSourceID="SiteMapDataSource1" OnItemDataBound="RadPanelbar1_ItemDataBound" EnableViewState="false" EnableEmbeddedSkins="false">  
     
    </telerik:RadPanelBar> 

    I hope this helps.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered