The templates used to make new pages are made of three files:
- A TMPL file, which defines the editable structure and layout of the page.
- A TCF file, which defines the form that users fill out when making a new page.
- An image file, used as the thumbnail icon for the template in the +New menu.
The information entered into the TCF is combined with the layout defined in the TMPL to create the new page (PCF).
The page tagging used to build a TMPL (and therefore a PCF) doesn't handle design elements. Instead, it controls the ways in which users can access and edit the content on the page. Templates in Omni CMS are written using XML, a customizable markup language. Styling is then applied via XSL stylesheets.
The template file must end with
.tmpl. The TMPL can be coded to create text-based include files (
.inc), XML files, and other files. Specify the output formats upon publish, most commonly
.xml. Omni CMS uses XML/XSL-based templates; HTML templates are rare and only supported in a few legacy cases.
The TCFs generate the form that accompanies the creation of a new page from a template. Users click +New (from Content > Pages) and select a template. You can set up templates that will create a new page, a new section that creates a new folder and supporting pages, a new XSL template, other specific content pages such as those for a RSS article or archive, or a faculty profile page. Depending upon the template selected, and upon template design, the TCF provides more specifications for the page creation. For example, the template can specify page title, description, author, keywords, the inclusion of a navigation file, among other options.
The file format for the thumbnail image can be an extension of
.jpg. Image file names should match the names of the templates they represent. If the prefixes of the file name (for example,
one-column.tmpl) match, then the user sees the image representing the template after clicking the +New button. If the prefixes don't match, or if a file extension other than
.gifis used for the thumbnail, define the complete path to the file on the production server. This is configured from Setup > Templates for the specific template.