More in this section
Forums / Sitefinity SDK / How to override the insert backend template of a custom module

How to override the insert backend template of a custom module

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. Duneel
    Duneel avatar
    166 posts
    08 Dec 2010
    24 Feb 2011
    Link to this post

    How do I override/extend the backend template of a custom module? Can I implement an .ascx template containing the fields in the module and reffer to that instead of the autogenerated view? If so how to map the individual field on the custom template so that Sitefinity know which fild on the template is mapped to which field on the module?

  2. George
    George avatar
    28 posts
    24 Sep 2012
    07 Mar 2011
    Link to this post
    Hello Duneel,

    Which template exactly you would like to override? If you mean the DetailForm template, you can do it by specifying an external template in the definitions of your module. Let's say your module is called ProductsModule, then the definition of the detail form may look like:

    Copy Code
    var productsEditDetailView = new DetailFormViewElement(backendContentView.ViewsConfig)
        Title = "EditItem",
        ViewName = ProductsDefinitions.BackendEditViewName,
        ViewType = typeof(DetailFormView),
        ShowSections = true,
        DisplayMode = FieldDisplayMode.Write,
        ShowTopToolbar = true,
        ResourceClassId = typeof(ProductsResources).Name,
        WebServiceBaseUrl = "~/Sitefinity/Services/Content/Products.svc/",
        IsToRenderTranslationView = true

    You need to add the TemplatePath pointing to your custom template like this,
    Copy Code
    TemplatePath = "~/YourCustomTemplate.aspx"

    You can look through the Products module code that shipped as a sample in the SDK package. There you can see how the templates are used and how you can map and persist fields.

    Kind regards,
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
2 posts, 0 answered