Kentico CMS 7.0 Developer's Guide

Managing the page template catalog

Managing the page template catalog

Previous topic Next topic Mail us feedback on this topic!  

Managing the page template catalog

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

You can manage page templates using the Site Manager -> Development -> Page templates interface. Here you can organize the templates into categories, configure their properties, create new templates, etc.


These configuration options can also be accessed for the templates of individual pages by selecting the appropriate document in the content tree of CMS Desk, and using the EditTemplateProperties Edit template properties action on the Edit -> Properties -> Template tab.


Each template has the following properties:


General tab


On this tab, you can specify the following properties of the page template:


Template display name

The name of the template displayed to users.

Template code name

The name of the template used in website code.


Here you can choose the category of the page template.

Template description

Description of the template shown in the page template selection catalog.


Teaser (preview) image assigned to the template. It is displayed in the page template catalog, e.g. when creating a new page.

Clone as ad-hoc for new documents

When a user selects a template with this option enabled for a new page, the system automatically creates an ad-hoc copy of the template and assigns it to the page. This way, users can immediately modify the design of the new page without changing the default re-usable template.


Only available if the Template type is set to Portal page.


Note: The system always clones templates as ad-hoc when creating wireframes, even if this setting is disabled for the assigned template.

Template type

Determines the type of pages that the template can be used for. The following options are available:


Portal page - functions as a standard portal engine page template.

ASPX page - uses the ASPX page template development model and is based on a standard ASPX web form. If selected, the path to the source file must be entered into the File name property.

ASPX + Portal page - works the same way as the ASPX page option, but also supports certain portal engine functionality, such as managing web parts or widgets in predefined zones on the Design tab of CMS Desk directly through the browser.

Dashboard page - provides a template for dashboard sections of the CMS interface. This type of page template cannot be used for standard content tree pages.

MVC - can be used to create pages defined through an MVC controller and action, which must be specified via the additional Default controller and Default action properties. Pages based on templates of this type automatically use the live URL and view in editing mode (i.e. on the Page tab of CMS Desk). Please see the MVC development model chapter for more information.

Master template

Only available if the Template type is set to Portal page. Indicates if the pages that use the template should be Master pages. Master page templates are usually used for the main menu and logo of a website.


Enabling this also causes the template to be selectable as the root master page template in the New site wizard.

Inherit content

Only available if the Template type is set to Portal page. Configures the visual inheritance as explained in the Visual inheritance topic.


You can choose from the following options:


Inherit all - inherits the content of all parent pages

Do not inherit any content - displays only the current page without any parent content

Inherit only master page - inherits from the first master page above the page in the content tree, i.e. if there are more master pages, it inherits only from the one which is the closest above it in the hierarchy

Select inherited levels - inherits only content from the chosen content tree levels

File name

Only available if the Template type is set to ASPX page or ASPX + Portal page. Specifies the path to the .aspx file that the page template should be based on. The file may either be chosen using the Select button, or its path can be entered manually. The tilde character (~) represents the root directory of the project folder, e.g. ~/CMSTemplates/CorporateSite/Blog.aspx

Default controller

Only available if the Template type is MVC.


Sets the name of the controller class containing the MVC action that should be performed when pages using this template are accessed (without the Controller part at the end). For example, if the class is called NewsMVCController, enter NewsMVC.


The system first searches for the specified class in the CMS.Controllers.<current site code name> namespace. If it is not found there, the CMS.Controllers.Global namespace is searched.

Default action

Only available if the Template type is MVC.


Specifies the exact action defined within the controller class that should be performed when pages based on this template are loaded.


Design tab


This tab is available only for Portal page or Dashboard page type templates. It can be used to define the content of the page template in the same way as on the Design tab in CMS Desk, but without requiring the context of a specific site. Web parts and widgets can be added (AddWebPart), removed (Delete), configured (Configure) or relocated using drag‑and‑drop. Individual zones may also be managed via their context menu that can be expanded by right clicking the header of the given zone or using the Web part zone menu (WebPartZoneMenu) action. Any changes made here will affect all pages using the edited page template.


Sites tab


On this tab, you can choose which websites the page template will be available for.


Scopes tab


Please refer to the Page template scopes topic for information about this tab.


Layout tab


Here you can edit the layout of the page template. You can either choose to use one of the pre-defined (shared) layouts or you can create a unique layout specifically for the given page template (custom layout). Learn more in the Page layouts topic.


Theme tab


This tab allows you to manage the files contained in the page template's theme folder. This usually includes any files required by the CSS styles added for the template's custom page layout on the Layout tab (e.g. images). For more information, please see the Development -> CSS stylesheets and design -> App themes topic.


Web parts


Here you can see the XML document with the configuration of the web parts. Use this dialog only in a situation when the standard Design mode isn't working as expected (e.g. due to an error or data inconsistency).




Here you can define custom HTML code that will be placed into the <head> element (i.e. inserted between the <head></head> tags) of all pages that use this page template. This can be useful if you need to link some additional CSS or JavaScript files.


The head content can also be inherited by child documents under pages that use this template. The inheritance depends on the following options, which can be specified on this tab for each template:


Allow child templates to inherit the current header - if enabled, the head content of this template will be inheritable by child documents.

Inherit header(s) from parent template(s) - indicates if documents based on this template should be allowed to inherit head content from the templates of documents that are above them in the content tree.


Please note that the header inheritance also follows the rules of the standard content inheritance, which can be configured for individual documents and templates. For example, all documents displayed within a master page would also inherit the head content of its template, but a child document without any visual inheritance would not. This way, the head code will only be added to pages where it is required to correctly display the master template's content.


Documents tab


On this tab, you can see a list of documents (pages) that are using the page template. By clicking a document in the list, you will be redirected to the document's CMS Desk -> Edit mode. The documents in the list can be filtered according to the Site they are on, their Document name and their Document type.