More in this section

Forums / Developing with Sitefinity / Controlling the SiteMenu

Controlling the SiteMenu

2 posts, 0 answered
  1. Rich
    Rich avatar
    6 posts
    Registered:
    25 Nov 2008
    25 Nov 2008
    Link to this post
    How can I gain control of the css on the SiteMenu? I added a CssClass to my control via the Page Editor, but it isn't picking up the CSS, I also went into Visual Studio and under Sitefinity, UserControls, Navigation, went to the sitemenu control and added the cssclass there and moved the css class inline with the control and still is not reading it. How do I get control of how the menu looks via CSS?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    26 Nov 2008
    Link to this post
    Hi Rich,

    Thank you for using our services.

    If you are trying to use one of the embedded skins you should set it in the control declaration. In the example below I am using "Outlook" skin for the RadMenu.

    <%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %> 
    <telerik:RadMenu     
        runat="server"  
        Skin="Outlook"
        > 
    </telerik:RadMenu> 

    Using a custom skin. Here you should declare your skin using Skin property of the control and set EnableEmbeddedSkins="false"

    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="SiteMenu.ascx.cs" Inherits="UserControls_Nav_SiteMenu" %> 
    <%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %> 
     
    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" /> 
    <telerik:RadMenu ID="RadMenu1" runat="server" DataSourceID="SitemapDataSource1" OnItemDataBound="RadMenu1_ItemDataBound" Skin="YourSkinHere" EnableEmbeddedSkins="false" /> 
    </telerik:RadMenu> 
     


    For more information take a look at RadMenu developers manual, Tutorial creating a custom skin.

    Regards,
    Ivan Dimitrov
    the Telerik team

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