Managing Templates

Table of Contents

Getting Started
Managing Folders
Creating a Folder
Editing a Folder
Moving a Folder
Deleting a Folder
Manage Templates
Creating a Template
Editing a Template
Changing a Template's Type
Resizing the Template Editor
Deleting a Template
Duplicating a Template
Moving a Template
Restoring an Old Version of a Template

Templates are used to control the layout of pages in your web site. It is perhaps the most difficult aspect of creating your web site with Recite CMS, however, once it has been done initially you will rarely need to make further changes to your templates.

All templates are written using Smarty Template Engine syntax. You can find the complete Smarty manual at http://smarty.net/manual/en/, or you can refer to the Template Writing Guide appendix in this guide.

Similar to how files are structured in Recite CMS, templates are stored in folders. These folders are separate to file folders.

There are many different types of templates, each of which is used in a different situation on your web site. For example, one type of template is used for listing out calendar events, while another is used for display search results.

This chapter covers how to manage templates and template folders in Recite CMS.

Getting Started

There are several different Control Panel widgets available to help you manage templates. These are as follows:

  • Template Browser. This widget lists all folders and templates within the active folder. You can click on a folder to set it to the active folder, or you can click on a tepmlate to load it in the Template Editor widget.

  • Template Manager Tree View. This widget shows all template folders, organised by their hierarchy. You can expand or contract the display as required.

  • Template Editor. This widget is used to edit templates directly through the Control Panel. You can't manually add this widget to a tab - it is loaded when you click on a template in the Template Browser widget.

  • Template Documentation. This widget is used to list data that is available for output in a template. Each template type has a different set of data associated with it.

You can either add these widgets manually (they can be found in the Template Management category in the widget browser), or you can create a new tab using the Templates pre-defined layout.

The following figure demonstrates this layout. This tab is a two-column layout with a wide right-hand column. In the left column is the Template Manager Tree View widget, while in the right column is the Template Browser widget.

Figure 5.1. Sample tab layout for managing templates

Sample tab layout for managing templates

For the purposes of this chapter, I'll assume you're working with a tab having the same layout as the pre-built Templates tab.