IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
To wire up the template with the view, you must return its name via the LayoutTemplatePath property. It specifies the path to the embedded resource following the naming convention <Namespace>.<ResourceFolderPath>.<TemplateName>, where you must replace path slashes inside the ResourceFolderPath with dots.
For example, if you have project called NewsRotator and the path to the template file is Resources/Views/RotatorDesigner.ascx, the LayoutTemplatePath property must be set as follows: NewsRotator.Resoureses.Views.RotatorDesigner.ascx.
NewsRotator.Resoureses.Views.RotatorDesigner.ascx
Use the following code:
public NewsRotator()
{
this.LayoutTemplatePath = NewsRotator.layoutTemplatePath;
}
. . .
private static readonly string layoutTemplatePath = ControlUtilities.ToVppPath("NewsRotator.Resources.Views.RotatorDesigner.ascx");
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important