Templating Overview

The template development section of the Support site provides an overview of the components used in creating templates. This includes code reference, tutorials, examples, and debugging tips.

Components Overview

New pages are created from page templates and can be added to the system at any time. These include a template file (TMPL) and a template control file (TCF). The use of XSL stylesheets can provide separation of structure and content. A custom image file can be used to create the thumbnail that the user sees.

New Page Wizard

The TCFs generate the page creation form (New Page Wizard) that accompanies the creation of a new page from a template. Users click New (from the Content > Pages screen) and are able to select a page or directory template. Depending upon their selection, and upon template design, they can provide more specifications for the page creation. For more details:

Template Control Files (TCF)

This can include page title, description, author, keywords, the inclusion of a navigation file, and file name, among other options.

Templates can be created for a wide variety of purposes such as automatically adding RSS feed capability or an RSS archive. They can also utilize the MultiEdit tag to allow for form-based editing of content such as with faculty pages. Designers can create a variety of layouts, such as a one-, two-, or three-column layouts. This can help ensure that different layouts are available for different purposes, but that they use the same style. Admins can create template groups to enable only specific templates for specific directories; thus limiting the template choice to the appropriate users and ensuring that the content is presented in the intended format.

Example of New Page Templates

New Page Templates Examples


Default Location

The template components reside in a template directory on the production server by default. This setting can be overridden on a site-by-site basis under Setup > Sites > Use Local Templates. New page templates are specific to a site. An account can include multiple sites and new page templates can be assigned and unique for each different site. 

Generally, the templates directory is located in the resources folder at root directory of the production server (e.g., _resources/ou/templates). By default, templates in the new page wizard are sorted alphanumerically as in the directory.

Directory Listing of Templates

Directory Listing of Templates

Changing the Template Location

The location of templates can be changed by editing the site record. Level 10 administrator privileges are required.

  1. Navigate to Setup > Sites.
  2. Select the Use Local Templates checkbox.
  3. Define the path for the templates on the staging server.

SuperAdmin authority level has the option of uploading the template files to the OMNI-INF/templates folder, typically found in the root directory on the staging server.

Naming Conventions

Each new page template uses four files:

  1. .tmpl file that contains the XML/XHTML template code and OUC style tagging.
  2. .tcf file that further expands the creation of new pages.
  3. .gif file that represents the thumbnail.
  4. .xsl file that contains XSLT commands, XHTML, and CSS.

The file format for the thumbnail image can be an extension of .gif, .png, .jpeg, or .jpg. Image file names should match the names of the templates they represent. If the prefixes of the file name (e.g., one-column.gif and one-column.tmpl.) match, then during new page selection, the image is shown.

If the prefixes don't match, or if a file extension other than .gif is used for the thumbnail, the complete path to the file on the production server must be defined. This is configured in Templates > Template Management screen > Image URL field for the specific template. 

Image URL Field

More Information

Template (TMPL) Files

The template file must end with .tmpl. Most commonly, the new page that is created in the system is a publish control file (PCF), which the user sees and edits. The TMPL can also be coded to create text-based include files (.inc), XML files, and other files. A variety of output formats can be specified upon publish. These would most commonly include .html, .pdf, .xml, and can include a variety of other file formats. The OU Campus system by default uses XML/XSL-based templates; although, for legacy purposes HTML-style templates are still supported. For more information about TMPL files, please see:

Template (TMPL) Files

Publish Control Files

The PCF (Publish Control File) is an XML data file which contains specific instructions concerning the manner in which OU Campus processes XML data upon publishing. In addition, the PCF specifies how the data is editable and displayed within OU Campus itself. The CMS users see the editable files with the .pcf extension. For more information:

Publish Control File (PCF)


XSL (eXtensible Stylesheet Language) stylesheets are used as part of the template fileset. The XSLs are defined as separate files and contained with the _resources directory. They are frequently defined in the prolog of a TMPL as a processing instruction.

For example:

<?pcf-stylesheet path="/_resources/xsl/default.xsl" extension="html"?>

An XSL document can be defined as an XML document, which contain XSLT commands (along with HTML and CSS) and are used to transform the contents of XML documents (PCF files) into more human readable forms such as HTML and XHTML. For more information see:

Introduction to XSL

Was this page helpful?

Additional Comments:

(Include your email address if you would like a reply)

Procede to