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

Forums / Designing with Sitefinity / Adding theme to radcontrols in intra-site modules

Adding theme to radcontrols in intra-site modules

5 posts, 0 answered
  1. Imran
    Imran avatar
    75 posts
    Registered:
    17 Jan 2007
    10 Sep 2008
    Link to this post
    Hello

    I have created some intra site modules that appear under Modules in the admin section. Some of my user controls have RadEditor in them, and I would like to add Theme/SkinID to them so they look and behave the same.

    These are the steps that I took (which did not work). Could you please correct me, or let me know of a better way to do this.

    1) Created new folder in App_themes called XXX
    2) Created a new skin called RadEditorBackend.skin with the following code:

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

    <telerik:radeditor runat="server" SkinId="HodderBackend" Width="500" Height="500"></telerik:radeditor>



    3) In my project > /sitefinity/admin/modules.aspx - I added theme attribute to the declartive of the page as such:

    <%@ Page Language="C#" MasterPageFile="~/Sitefinity/Admin/Admin.master" AutoEventWireup="true" CodeFile="Modules.aspx.cs" Inherits="Modules" Title="Untitled Page" Theme="XXX" %>


    4) Then in my user control / modules on the RadEditor I added the SkinID as HodderBackend

    This did not work.. any ideas? All help would be greatly appreciarted
  2. Katia
    Katia avatar
    194 posts
    Registered:
    01 Jul 2016
    12 Sep 2008
    Link to this post
    Hi Imran,

    I suggest that you read Create New Skin tutorial for RadEditor from the online documentation: http://www.telerik.com/help/aspnet-ajax/createnewskin.html.

    In brief:

    1. In your user control set the EnabledEmbeddedSkins property to false.
    2. Set Skin property to HodderBackend.
     

    <telerik:radeditor runat="server" Skin="HodderBackend" EnabledEmbeddedSkins="false" Width="500" Height="500"></telerik:radeditor>


    3. Copy an existing Rad Editor skin files in your site theme folder (App_Themes/YourSiteTheme). There is no need to create a new skin folder. In case you don't have the files I have attached them.
    4. After that open Editor.Default.css and replace .Default with .HodderBackend everywhere in the file.
    5. As the CSS files will be in your site theme folder they will be automatically added to every page of the site.
    6. After that you can start changing the skin to achieve the design you want.

    Greetings,
    Katia
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Imran
    Imran avatar
    75 posts
    Registered:
    17 Jan 2007
    12 Sep 2008
    Link to this post
    Katia, Many thanks for you reply.

    With regards to your response, I am not so much concerned with skinning the RadEditor. I want to create a Theme for it so I can control all the properties of the Editor through my theme. Properties like: witdth, height, newlinebr, image/document paths etc. I want all my instances of RadEditor in my app to have the same properties.

    Please see my original question at the telerik forum: 
    http://www.telerik.com/community/forums/thread/b311D-bgbabh.aspx

    and what I am trying to achieve, but in my custom intrasite module in sitefinity modules section:
    http://www.telerik.com/help/aspnet-ajax/usingthemes.html

    Thanks.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    16 Sep 2008
    Link to this post
    Hello Imran,

    Please add the following block of code to Modules.aspx.cs

        public override string Theme 
        { 
            get 
            { 
                return BlueTheme; // this is a theme named BlueTheme 
            } 
            set 
            { 
                //do nothing. 
            } 
        } 

    Here we apply programmaically the Theme property and in the get accessor, return the name of the theme. Hope this helps.


    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Imran
    Imran avatar
    75 posts
    Registered:
    17 Jan 2007
    16 Sep 2008
    Link to this post
    Thanks very much, all works well now !
Register for webinar
5 posts, 0 answered