Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): Designing with Sitefinity > Removing the styling from site treeview and sitemenu controls

Removing the styling from site treeview and sitemenu controls

  • Ian avatar

    Posted on Jul 27, 2010 (permalink)

    Hi All,

    I am planning using the site treeview and the sitemenu controls to output the site navigation, but I wish to remove all styling applied to the control by sitefinity. I have removed the skin value, but some styling is still being applied from a webresource.axd file.

    Is there any way to do this?

    Cheers Ian

    Reply

  • Answer Radoslav Georgiev Radoslav Georgiev admin's avatar

    Posted on Jul 27, 2010 (permalink)

    Hi Ian,

    Thank you for using our services.

    The Sitefinity navigation controls are built using the RadControls for ASP.NET Ajax. For example the Site Menu is using RadMenu for ASP.NET Ajax. Although you have made the control load your custom skin it is loading some base style sheets which are used to create the behavior of the menu (e.g. show child items on mouse over). Those are the should be the styles that are coming from the WebResource.

    You can disable the base style sheet of the controls however this will break their behavior unless you specify an external location (or your own style rules) for those styles. More information can be found in the bellow articles:
    Controling appearance of RadControls for ASP.NET AJAX in Sitefinity
    Disabling embedded resources

    Greetings,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Jon avatar

    Posted on Jul 27, 2011 (permalink)

    Hello,

    I was reading this article in hopes to finding a solution to my problem. My problem is that I am using the RadTreeView control in my master page but I don't want all the embedded styling since I will be loading my own. So I have found an article in the documentation that instructs how to remove the embedded css from controls.

    http://www.telerik.com/help/aspnet-ajax/introduction-disabling-embedded-resources.html

    So I entered this

    <appSettings>
        <!-- Disables the embedded scripts and skins for all RadControls -->
        <add key="Telerik.EnableEmbeddedSkins" value="false"/>
        <add key="Telerik.EnableEmbeddedBaseStylesheet" value="false"/>
        <add key="Telerik.EnableEmbeddedScripts" value="false"/>         
    </appSettings>

    I have also tried the variant:

    <appSettings>
        <!-- Disables the embedded scripts and skins for all RadControls -->
        <add key="Telerik.RadTreeView.EnableEmbeddedSkins" value="false"/>
        <add key="Telerik.RadTreeView.EnableEmbeddedBaseStylesheet" value="false"/>
        <add key="Telerik.RadTreeView.EnableEmbeddedScripts" value="false"/>         
    </appSettings>

    After all this site looks great (without the RadControls formatting)...but now the admin site (where pages and content is made/edited) seems to be missing some formatting. And now I'm also receiving a javascript error from IE when going to the "Pages" tab. This error states:

    Webpage error details
      
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8)
    Timestamp: Wed, 27 Jul 2011 19:25:08 UTC
      
      
    Message: 'Telerik.Web.UI.RadTreeView' is null or not an object
    Line: 2948
    Char: 1
    Code: 0

    So my question is. How can I disable the embedded styles for that one control and keep all the functionality of my admin pages? Please advise. Thank you.

    Attached are some screenshots of what the admin page looks like with the above code entered in the web.config.

    Attached files

    Reply

  • Peter Peter admin's avatar

    Posted on Jul 29, 2011 (permalink)

    Hi Jon,

    If you disable the embedded java script for RadTreeView, you have to manually register it:
    <Scripts>
        <asp:ScriptReference Path="~/Scripts/Common/Core.js" />
        <asp:ScriptReference Path="~/Scripts/Common/jQuery.js" />
        <asp:ScriptReference Path="~/Scripts/Common/jQueryPlugins.js" />
        <asp:ScriptReference Path="~/Scripts/Common/Animation/AnimationScripts.js" />
        <asp:ScriptReference Path="~/Scripts/Common/Navigation/NavigationScripts.js" />
        <asp:ScriptReference Path="~/Scripts/TreeView/RadTreeViewScripts.js" />
    </Scripts>


    Kind regards,
    Peter
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

    Reply

  • Register for webinar
Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): Designing with Sitefinity > Removing the styling from site treeview and sitemenu controls