Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity: Sitefinity SDK > External template for custom module not working

External template for custom module not working

  • Posted on Jan 18, 2012 (permalink)

    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

    Reply

  • Stanislav Velikov Stanislav Velikov admin's avatar

    Posted on Jan 23, 2012 (permalink)

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

    Reply

  • Posted on Jan 23, 2012 (permalink)

    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

    Reply

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity: Sitefinity SDK > External template for custom module not working