External template for custom module not working - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

External template for custom module not working

  • External template for custom module not working
  • Hi all,

    I've created a custom module, based on the Products Module. When I try to set an external template for my Products Detail View, nothing happens. It still refers to the built-in template. I'm doing it exactly the same way as when linking external templates to e.g. the News Module or Blogs Module.

    Is this a known issue?

    Regards,
    Daniel
  • Hello Daniel, 

     Mapping DetailsView.ascx will not work since it is not frontend template: Map FrontendProductsDetailsView.ascx template trougg Administration->Settings->Advacned->Controls->ContentView. After mapping a template remember to restart the application to apply changes.

    Kind regards,
    Stanislav Velikov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  • Hi Stanislav,

    After changing the LayoutTemplatePath in my custom module from this:
    /// <summary>
            /// Gets or sets the layout template path.
            /// </summary>
            /// <value>The layout template path.</value>
            public override string LayoutTemplatePath
            
                get
                
                    return ProductsModule.ProductsVirtualPath + layoutTemplateName;
                
                set
                
                    base.LayoutTemplatePath = value;
                
            

    to this:
    // <summary>
            /// Gets or sets the layout template path.
            /// </summary>
            /// <value>The layout template path.</value>
            public override string LayoutTemplatePath
            
                get
                
                    //return SchoolsModule.SchoolsVirtualPath + layoutTemplateName;
                    return base.LayoutTemplatePath;
                
                set
                
                    base.LayoutTemplatePath = value;
                
            

    I'm able to set a custom template path.
    I'm not using the embedded views, so this will work for me.

    Regards,
    Daniel