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

Forums / Developing with Sitefinity / GenericContentDesigner template not picking up change

GenericContentDesigner template not picking up change

5 posts, 1 answered
  1. LouiseBA
    LouiseBA avatar
    61 posts
    Registered:
    23 Mar 2010
    27 Sep 2010
    Link to this post
    Hello

    I am following these instructions to get SF to use a template and not the embedded one.
    http://www.sitefinitywatch.com/blog/09-03-20/Disabling_the_HTML_Edit_Mode_in_RadEditor.aspx
    I need to disable the FixEnclosingP contentfilters but just to test the theory with an obvious visual change im adding EditModes="Design". I have this in the controlsConfig.xml in app_data

    <?xml version="1.0" encoding="utf-8" ?>
    <controlsConfig>
      <viewMap>
        <viewSettings hostType="Telerik.Cms.Engine.WebControls.Design.GenericContentDesigner" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Generic_Content/GenericContentDesigner.ascx" />
      </viewMap>
    </controlsConfig>


    and this template file:

    ~\Sitefinity\Admin\ControlTemplates\Generic_Content\GenericContentDesigner.ascx

    with my change EditModes="Design" in the RadEditor bit

    I have restarted the app. The three tabs are still there, design, html and preview. If I rename the layouttemplatepath in the config to AdminXXX/ControlT... or whatever,it errors saying it cant find the file. So it must be kind of working. But my 3 tabs are still there in both the modules..generic content section rad editor, and in the dialog when I drag the Generic Control control into a page and edit it.

    What am I missing please?!

    Thanks, Louise
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    27 Sep 2010
    Link to this post
    Hello LouiseBA,

    Try setting the modes from the server

    sample

    protected override void OnPreRender(EventArgs e)
       {
           base.OnPreRender(e);
           textEditor.EditModes = EditModes.Design;
       }


    Greetings,
    Ivan Dimitrov
    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
  3. LouiseBA
    LouiseBA avatar
    61 posts
    Registered:
    23 Mar 2010
    27 Sep 2010
    Link to this post
    hmm thanks Ivan I appreciate the offering of an alternative but .. shouldnt the approach i referenced work? or what is the point of this persons blog which I am assuming is an official sitefinity approved one.

    I want a lot more control over the GC editor in general. Properties of the radeditor, css etc etc. This property is just an example I tried to get it to work and I followed the instructions word for word.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    27 Sep 2010
    Link to this post
    Hi LouiseBA,

    Some of the properties of the RadEditor are initialized after the settings you apply and your modifications are overridden. The RadEditor opens in a RadWindow and OnPreRender is enough late to set this property as I show you. The post you refer is over an year old and there are changes in our code and RadControls code.

    All the best,
    Ivan Dimitrov
    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
    Answered
  5. LouiseBA
    LouiseBA avatar
    61 posts
    Registered:
    23 Mar 2010
    27 Sep 2010
    Link to this post
    I see, thanks. Well, that worked :)

    I tried that for an hour not realising his approach with the template has been superceded :-/
Register for webinar
5 posts, 1 answered