Templates Overview

Last edited: 11/8/2010

The template module is a powerful system that allows developers to provide different layouts for CMS content.

The following templates are required by the system, though their contents can be freely tailored to your needs:

  • index.php (default home page template)
  • ekk_articlepage.php (article detail template)
  • ekk_eventpage.php (event detail template)
  • ekk_sermonpage.php (if sermon module is enabled)

These templates do not need to be registered with the system.

Registering templates with the CMS

  1. Upload the template file(s) to the document root of your site's FTP server.
  2. Log into the CMS.
  3. Navigate to Content > Templates and select 'Add New Template'
  4. File Name: Enter a friendly name for the template, which will show in the Template drop down list on the page create/edit page.
  5. File Name: Enter the path to the template file relative to the document root directory on the FTP server. 
  6. Description: is optional
  7. Enabled? allows you to select the modules you want this template to be available to
  8. Use as Default Template? specifies which modules will show this template as default in the dropdown
  9. Use as Search Template should only be checked for a custom template you have set up to display Search results
  10. Once the file name is entered, the template file will be downloaded and parsed for user-selectable sections. These labels will be displayed along with drop downs, allowing a for a default section to be selected for each section parsed from the template file.

One important technical note is that template files are parsed recursively. That is, in addition to sections being parsed from template files, section labels from any and all included files will also be parsed.

NOTE: When editing templates, you can change the default sections for a template as well as the template name, but you cannot change the template file name.

Bulk Registering Templates with the CMS

The CMS also supports bulk import of templates, navigate to Content > Templates > Bulk. The document root directory of the FTP server will be scanned and all php templates will be listed. All checked templates will be imported into the system. It is highly recommended that user-friendly names are entered prior to import.

Using templates with records for modules

After a template file has been successfully added via the backend, the template can be used for new and existing records for modules that use template management. These modules include: Blogs, Pages, & Newsletters.

To associate a template with a record, select a template from the Template drop down. When a template is selected, the sections associated with that template will be displayed, along with the default sections selected for that template. These sections can be custom selected for the each record.