Kentico CMS 7.0 Developer's Guide

Page template scopes

Page template scopes

Previous topic Next topic Mail us feedback on this topic!  

Page template scopes

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

Page template scopes define where a page template can be used. Important - template scopes are not a security feature! They only provide a way how to simplify the user experience by not offering too many page templates to the users!

 

This means that you can limit which page templates will be offered to the users in the page template catalog in a certain location. However, when a user creates a page there, they can move it to another location, even to one which is not allowed by the template scope.

 

Template scopes can be defined on the Scopes tab when selecting a page template from the tree in Site Manager -> Development -> Page templates. There are two basic options available:

 

Template can be used on all pages - the use of the page template is not limited (it can be used in all parts of the website).

Template can be used only within following scopes - if selected, the page can be used according to the rules defined by the template's scopes.

 

If you choose the second of the options mentioned above, UI controls for managing the scopes will be displayed below the line.

 

Based on the site selected in the Site drop-down list, you can display either site-related scopes or global scopes. Site-related scopes are applied only on the selected site, while the (global scopes) option indicates that the scopes are valid on all sites in the system.

 

Using AddTemplateScope New template scope, you can create new template scopes. Listed scopes can be Edited (Edit) or Deleted (Delete).

 

devguide_clip2073

 

When creating a new scope or editing an existing one, you can specify the following details, which define where the page template can be used:

 

Starting path - path in the content tree where the page template can be used. The page template will not be offered outside of this path.

Document type - the page template can be used only for documents of the specified type.

Culture - the page template can be used only in the specified culture.

Levels - the page can either be used on all levels or only on the selected levels in the content tree.

 

devguide_clip0958