Skip to main content
Logo
There is a newer version of Contensis. Click to find out more and download the latest version.

Master page templates in depth

When creating a page template in Contensis, the template inherits the contents of the System Default Master Page template. The Master Page template defines the core document markup and includes elements to support Contensis features. The inherited Master Page template is set against a publishing server and uses the System Default template unless custom Master Page Templates have been assigned.

System Default

Each of the controls that are used by the Master Page Template in Contensis are documented to gain a better understanding for what they are used for.

Declaration

<%@ Master Language="VB" Inherits="CMS_API.WebUI.WebControls.MasterPages.MasterTemplate" %>

The first line, is the template declaration, it tells Contensis what language the template is written in, and if it inherits from another template. As a root template, it will inherit from CMS_API.WebUI.WebControls.MasterPages.MasterTemplate which is the default Contensis Master Page Template. This line is required for the templating system to work.

contensis:Doctype

<contensis:Doctype runat="server" />

The contensis:Doctype element renders the Doctype defined against the Project_HtmlDoctype setting in project setup. This setting not only determines the Doctype that is rendered to the front end site but also how the editor / parser / QA should handle the content in the page.

contensis:Charset

<contensis:Charset runat="server" />

The contensis:Charset element renders the appropriate character set for the Doctype that is being used by the rendered page.

asp:Literal ID=”TitleBar”

<asp:Literal ID="TitleBar" runat="server"/>

The asp:Literal ID=”TitleBar” literal renders the page title defined in the page editor or the value set via the WebAPI.

Note: If you are using TitleBar.Text in custom code, this is still supported. However it’s worth updating this to Page.Title where possible.

contensis:CMS_Placeholder ID=”HTMLHeader”

<contensis:CMS_Placeholder ID="HtmlHeader" tagtorender="none" runat="server"/>

The contensis:CMS_Placeholder ID=”HTMLHeader” element is a legacy Contensis element that is used by some of our web controls to output markup in to the page. This may be deprecated in future versions of Contensis.

asp:ContentPlaceholder ID=”Metadata”

<asp:ContentPlaceHolder ID="MetaData" runat="server"/>

The asp:ContentPlaceholder ID="Metadata" is, as the name implies a placeholder for content to be inserted into the rendered page. In this case Metadata that is marked for Output to Webpage against a metadata definitions in Contensis.

contensis:StylesheetCollection

<contensis:StylesheetCollection ID="StyleSheetCollection" runat="server"/>

The contensis:StylesheetCollection element is used to output stylesheets defined against your page templates using the Contensis interface

asp:Literal ID=”ContensisInternalHeader”

<asp:Literal ID="ContensisInternalHeader" runat="server"/>

The contensis:CMS_Placeholder ID=”ContensisInternalHeader” element is a legacy Contensis element that is used by some of our web controls to output markup in to the page. This may be deprecated in future versions of Contensis.

asp:Literal ID=“ContensisHeader”

<asp:Literal ID="ContensisHeader" runat="server"/>

The asp:Literal ID=”ContensisHeader” is an ASP literal that is used to render code in the document header through Custom Code.