By continuing to use this site, you agree to the storing of first- and third-party cookies on your device to enhance site navigation; analyze site, product, and service usage; and assist in our marketing and promotional efforts. Cookie Policy

Skip to Content

Creating a Page Template

Templates in OU Campus generate new pages or sections via a form interface. In Content > Pages, click on the +New button for a dropdown of pre-existing templates. These templates are generated from a combination of three files working together:

  • Image: The thumbnail image used in the New Content box.
  • Template Control File (TCF): The form fields a user fills out when making new content that directs the inputs to the appropriate template file(s).
  • Template File (TMPL): The layout for the new page or file that accepts the inputs from template control file form fields.

ImageLink to this section

You can use any image file type for the thumbnail image. The name of the image file needs to match the name of the TCF to be properly associated (e.g. interior.jpg for the image file and interior.tcf for the TCF). Otherwise, you can explicitly choose an image in Setup > Templates.

Template Control File (TCF)Link to this section

The TCF supplies the form field prompts seen during new page/section creation and contains execution instructions on how to use the inputs given. You can find up to four different lists contained within a TCF.


The variable list defines the form fields included in the prompts when a new page/section is being created. This list is generated by placing a <variable-list> node inside a TCF with a separate <variable> node for each form field prompt.

On the <variable> node, you can include the type attribute, which specifies the type of form field. There are eleven types of form fields available, each with their own set of attributes.

  1. Asset Chooser
    Asset Chooser
  2. Checkboxes
  3. Date Picker
    Date Picker
  4. Date/Time Picker
    Date/Time Picker
  5. File Chooser
    File Chooser
  6. Radio
  7. Select (Dropdown)
    Select (Dropdown)
  8. Tag
    Tag Chooser
  9. Text
  10. Text Area
    Text Area
  11. Time Picker
    Time Picker

Below is an example of a variable list:

	<variable section="New Page Information" name="page-title" type="text" group="Everyone" prompt="Page Title" alt="Enter the title for this page">Page Title</variable>


The template list references the template file(s) (TMPL) used when the TCF is executed. This list is generated by placing a <template-list> node inside a TCF with a separate <template> node for each TMPL.

Below is an example of a template list:



The directory list defines folders created when this TCF is executed. This list is generated by placing a <directory-list> node inside a TCF. Inside of that node, a <parent> node is placed to define where the new folder is created. Inside of that, a <directory> node defines the actual folder.

Below is an example of a directory list:

   <parent name="current_folder" force-lowercase="no" path=".">
      <directory name="images" prompt-prefix="New Section" rss-feed="*inherit*" force-lowercase="yes" display-group="yes" template-group="*inherit*" publish="yes">{dirname}/images</directory>


The navigation list defines updates to be made to navigation files when a TCF is executed. This list is generated by placing a <navigation-list> node inside a TCF with a single <navigation> node appearing for each autonav option defined. Only one navigation update can be made by a TCF.

Below is an example of a navigation list:

	<navigation name="true" path="" publish="no"><li><a href="{ox_autonav:shorturl}">{title}</a></li></navigation>
	<navigation name="false" path="" publish="no"></navigation>

Template File (TMPL)Link to this section

The TMPL is structured to mirror the final page/file output of the template creation process. It accepts the inputs entered into TCF form fields during this process and employs <!--%echo var="..." --> statements to direct those inputs into the appropriate locations within the source code.

Below is an example of an <!--%echo var="..." --> statement:

<title><!--%echo var="title" --></title>
<meta name="Description" content="<!--%echo var="description" -->" />
<meta name="Keywords" content="<!--%echo var="keywords" -->" />