Kentico CMS 7.0 Tutorial  

Re-using page templates

Re-using page templates

Previous topic Next topic Mail us feedback on this topic!  

Re-using page templates

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

In the previous topic, you have learned how to create a new page with its own, page-specific template. This type of page template is called an ad-hoc page template.

 

Now, you will learn how to convert the page-specific template into a re-usable page template that can be used to create several pages with the same general layout, but different content.

 

1. Go to CMS Desk -> Content. Click the new About Us page and switch to the Properties tab. Select Template in the sub-menu. Now you can see a dialog like this:

 

tutorial_clip0049

 

2. Click SaveAsNewPageTemplate Save as new template and enter the following values:

 

Template display name: Left image with text on the right

Template category: Templates with editable regions

Template description: Two columns with an image on the left and text on the right.

Assign to the current document: Yes (leave it checked)

 

tutorial_clip0050

 

Confirm the creation of the template by clicking OK.

 

Result

 

You have just created a new re-usable page template. If you try to add a new page now, the page template is available among the offered options in the Templates with editable regions category and you can easily create another page with the same structure as the About Us page.

 

Because the Assign to the current document option was checked, the system also automatically assigns this template to the current page instead of the previous ad-hoc template.

 

tutorial_clip0051

 

 

InfoBox_Note

 

Modifying shared page templates

 

Please note that when you modify a re-usable page template, the changes will affect all pages that use this template!

 

 

InfoBox_Exclamation

 

Important!

 

Please keep in mind that when you create a page based on an ad-hoc page template and later delete it, the corresponding ad-hoc template will be deleted as well and cannot be restored.