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

Forums / Developing with Sitefinity / Creating my own Content module based on GenericContent

Creating my own Content module based on GenericContent

3 posts, 0 answered
  1. Jonathan Conway
    Jonathan Conway avatar
    2 posts
    Registered:
    30 May 2006
    06 Jan 2009
    Link to this post
    Hey Guys,

    I'm new to the forum and to Sitefinity, so please bear with me.

    I've set up a custom pluggable module in Sitefinity called "Content". My aim is to allow the user to go into "Page" view in Sitefinity, click "Edit Page", click my "Content" control on the right-hand side and drag it onto the page. Then they should be able to click "Edit" on the control and a screen should pop up. That screen should be similar to the "Generic Content" edit screen, having a rich text editor with bold, italic, underline, etc and Save button. However, my screen should also have several custom fields underneath the rich editor control, that are specific to my control. The user should be able to manage a list of tags among other things.

    Now so far I've gotten to the stage of having my control shown on the right, being able to drag it onto the page and being able to click "Edit" and see the pop-up window with the rich editor.

    The problem I'm having is with customizing this dialog box.

    I basically created this custom module by copying all the GenericContent files, including "EditorTemplate.ascx", which defines the rich editor markup. However when I modify my copy of the file, all my changes are ignored and Sitefinity continues to use the "EditorTemplate.ascx" under the GenericContent folder.

    I tracked this down to the Telerik.Cms.Engine.ContentProviderBase class, which I dissassembled using Reflector. What I found is this line of code, in which is hard-coded the location of the EditorTemplate.ascx file:

    this.editorTemplate = this.GetStringValue(config, "editorTemplate", str + "EditorTemplate.ascx");

    I tried to solve the problem by extending this class, but that won't work because the variable "editorTemplate" is private.

    So I'm asking you SiteFinity guys, is there any way I can create a custom Edit screen for my Content control?
  2. Jonathan Conway
    Jonathan Conway avatar
    2 posts
    Registered:
    30 May 2006
    07 Jan 2009
    Link to this post
    Cmon guys? :(
  3. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    08 Jan 2009
    Link to this post
    Hi Jonathan Conway,

    Thank you for your interest in our CMS!

    Let me answer your question now - Yes this is possible to create a custom Edit screen for your user control. You may create control designer as showed in our Developers Manual article Implementing Control Designers.

    I hope this helps! Please feel free to contact us again, if you need any further assistance.

    Kind regards,
    Georgi
    the Telerik team

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