Support

Core Modules Documentation

To create a new Master:

  1. Click the Cms > Layout > Masters node.
  2. Click the "New Master" button.
  3. Specify the following information:
    1. Name - Friendly name to refer to the Master
    2. Parent master - Optional.
    3. Domain & sub domain - The domain and sub domain that this Master will be used for. To learn how to add domains and sub domains, click here.
  4. Click "Ok".

The master will be created with the default markup:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<Cms:PlaceHolder Name="HeadSection" />
	<Cms:Include Type="Css" Name="HeadCss" />
	<Cms:Include Type="Script" Name="HeadScript" />
</head>
<body>
	<Cms:PlaceHolder Name="PlaceHolder1" />
</body>
</html>

Below is a table showing the available CMS controls on a Master. Each control can be inserted using icons in the tool bar above the Master content area.

Control Name Summary
Placeholder A placeholder tag that sub masters and templates can inject other controls into during rendering.
User Module Renders a custom user module's item.
Global Value Renders a global value as defined in Site Settings > Global Values.
jQuery This is a marker control informing the layout engine to include the jQuery framework script as defined in the Global Value: Javascript Frameworks > jQuery. The placement of this control in the Master does not matter as it will be included as the first script in the first script include control found during rendering.
Script Link Renders and registers a javascript link during rendering. By registering the link the layout engine will not render any other duplicate script links that might have been registered by another module present on the page.
CSS Link Renders and registers a CSS link during rendering. By registering the link the layout engine will not render any other duplicate CSS links that might have been registered by another module present on the page.
Includes Supports two types: "Css" and "Script". This control represents the placeholders of each type that modules and items can inject registered links and content.
Custom View Renders a custom Razor file. FilePath attribute is required. Learn more about Custom Views.
Built-in Modules In addition to the Master specific controls, most built-in module items can be directly placed inside a Master for rendering. Since the built-in Page module is the top level module in the CMS during rendering, other Page module items cannot be directly placed in the Master. To learn more about the built-in modules, click here. 

 

Creating a Sub Master

A Master can be created with another Master as it's parent. This sub Master can then be used as a layer to group common elements and removing any redundant elements in the parent or root Master.

<Cms:Content PlaceHolderName="HeadSection">
    <Cms:PlaceHolder Name="HeadSection" />
</Cms:Content>
<Cms:Content PlaceHolderName="PlaceHolder1">
		<div class="pageleft">
			<div class="inner">
                <Cms:PlaceHolder Name="LeftSidePlaceHolder" />
			</div>
		</div>
		<div class="pagemid">
			<div class="inner">
                <Cms:PlaceHolder Name="MainPlaceHolder" />
			</div>
		</div>
</Cms:Content>

 

The Master example above has the default Master as it's parent. The CMS Content tags correspond to the CMS PlaceHolder tags in the parent Master through the PlaceHolderName attribute. The CMS Content tags contain markup specific to the sub Master that are injected into the PlaceHolder tags in it's parent. By further defining PlaceHolder tags in the sub Master, we are allowing the Template to inject its specific content into the location of the PlaceHolders in this sub Master. In the example above, a two column layout is used with PlaceHolders for any Template that uses this Master to inject its content into. Using a sub Masters, we can then have varying markup across Templates without creating separate root Masters to reflect each difference. If a parent Master is used, then all markup and CMS controls must be contained inside CMS Content controls.