More in this section
Forums / 3.x Pre-release forums (retired) / EditorTemplate.ascx configuration

EditorTemplate.ascx configuration

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. fregas baratis
    fregas baratis avatar
    185 posts
    14 Nov 2002
    08 Mar 2007
    Link to this post

    i was trying to configure the RadEditor's ImagePaths, UploadPaths, etc. so that my users can upload content.  By searching the forums, i found the EditorTemplate.ascx for the generic content control.  However, in my case, I would like to programatically set these properties to all use the same directory, which i would like defined in the web.config.  Is there a way i can programmatically do this?  I was able to get to the codebehind for the editor in Sitefinity 2.7 but there's no codebehind here.

    This is also another instance where having the source code to the modules would help a lot.

  2. Bob
    Bob avatar
    330 posts
    30 Dec 2016
    09 Mar 2007
    Link to this post
    Hello Craig,

    EditorTemplate.ascx is the default layout template for the content tab in the GenericContent’s properties window. The path to this template is specified for each provider in the web.config file. You can also override this path by setting the EditorTemplatePath property of GenericContronent control. This way you can use different templates for different instances.

    Here is an example how to access the editor programmatically:

    In the Admin folder find and open the CtrlProps.aspx.cs file.
    Add the following code:

    protected override void OnPreRender(EventArgs e)
    RadEditor editor = Telerik.Web.UI.ControlHelper.GetChildControl<RadEditor>(this);
    if (editor != null)
    editor.ImagesPaths = new string[] { "~/Images" };

    All the best,
    the telerik team
2 posts, 0 answered