Introduction

A Template in lemoon 4 cms is an ASP.NET Web Form (.aspx). A web form is divided into two separate pieces, the visual part and the logic. The visual part is referred to as  the Web Form page which consists of static html, server controls scripts and som on. The logic of the page consists of code that interacts with the web form page. The code often resides in a separate file which is called the "code-behind" file. The code-behind files can be written in either VB.NET (.vb) or C# (.cs)

Templates in lemoon 4 cms

All templates that you want to use in lemoon 4 cms must be located in the \web\lemoon\template folder. The templates should inherit from the generic PageBase<T> class in order to take full advantage of the rendering flow where properties like Content and Site are available.

namespace MyProject.Template
{
    public partial class Page : PageBase<Mindroute.Core.Model.Content>
    {

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
        }
    }
}

 

Templates and Content types

A content type should use a template to render its content. For more information about templates and content types, click here.

There are no comments on this page.
   
 

Customize this section

The widgets presented in this column can be added, removed and sorted - just click the icons to the right of the caption.
 
     
   
 

Working copies