External template for custom module not working

Posted by Community Admin on 05-Aug-2018 16:11

External template for custom module not working

All Replies

Posted by Community Admin on 18-Jan-2012 00:00

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

Posted by Community Admin on 23-Jan-2012 00:00

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 >>

Posted by Community Admin on 23-Jan-2012 00:00

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

This thread is closed