Templates

Templates

This folder contains three types of interconnected files: TCF, TMPL, and picture files. Each TCF is linked to a picture icon (usually .gif or .png) that OU Campus users see when they are using new page wizards. 

TCF Files

TCF files contain all of the options that are presented to users when they are creating a new page with a wizard. Each New Page/Section wizard is represented by one TCF file. Typically, this file will gather information from users such as the page title, file name, page description, and basic initial content to populate the page with. 

TMPL Files

Once a user has completed filling out the entry fields provided by the TCF, a template (TMPL) is filled out based on that information.  Although a template is usually an empty page, templates are also used to construct navigation files and section properties files as well. 

 

New Landing Page Wizard

When you want to create a new Landing page, you will want to choose the “Landing Page” picture, which is associated with the landing.tcf. Information entered in the fields that are then shown will be used to create the Landing page. The Page Title, Keywords, Description and Content will be inserted into the created PCF file, which holds the content for the new page.

If you choose to “Add Navigation Item”, a link to the page will be automatically added to the side navigation file for the section that the new Landing page is created in.

You must also give each new Landing page a name using only letters, numbers and underscores. Note that there is a .pcf extension automatically entered in. This ensures that a PCF file is created correctly, which will then be used with an XSL file to create the page the user will view upon production. When you change the name from “untitled.pcf” to the name you would like the new page to have, remember to leave the “.pcf” extension so that the new page is created correctly. Thus, if you wish to create a page named “landing”, you need to change the field to show “landing.pcf” before you continue.

If you wish to create a page with the same name as an existing page, you must check the box to overwrite the new page to replace the old page with the new one.

You may also choose to restrict access to who can edit the new Landing page by updating the “New Landing Page Access” setting. By default this will inherit these settings from the directory it is created in; selecting a different choice will override this default.

Landing pages use both the created PCF file from the wizard and the landing.xsl file to create the finished page. The content displayed on this page will be drawn from the created PCF file and related include files, such as the _props.inc breadcrumb file and the _nav.inc side navigation file.

 

New Interior Page Wizard

When you want to create a new Interior page, you will want to choose the “Interior Page” picture, which is associated with the interior.tcf. Information entered in the fields that are then shown will be used to create the Interior page. The Page Title, Keywords, Description and Content will be inserted into the created PCF file, which holds the content for the new page.

If you choose to “Add Navigation Item”, a link to the page will be automatically added to the side navigation file for the section that the new Interior page is created in.

Interior pages can have anywhere from one to four columns, and so you must select how many columns you would like the page to have here. Each content area described has an associated WYSIWYG area available to enter in initial content. If a page will not use the associated content area, you do not need to fill any information in the associated WYSIWYG as it will simply be ignored unless the page type is changed to include it later on.

  • A one-column page will not have a sidebar area, and display only a single editable region.
  • A two-column page displays the sidebar and one editable region directly to its right.
  • A three-column page displays the sidebar and the main content, with a right column content area as well.
  • A four-column page displays the sidebar, main content and right column, with another far right column as well.

You must also give each new Interior page a name using only letters, numbers and underscores. Note that there is a .pcf extension automatically entered in. This ensures that a PCF file is created correctly, which will then be used with an XSL file to create the page the user will view upon production. When you change the name from “untitled.pcf” to the name you would like the new page to have, remember to leave the “.pcf” extension so that the new page is created correctly. Thus, if you wish to create a page named “interior”, you need to change the field to show “interior.pcf” before you continue.

If you wish to create a page with the same name as an existing page, you must check the box to overwrite the new page to replace the old page with the new one.

You may also choose to restrict access to who can edit the new Interior page by updating the “New Interior Page Access” setting. By default this will inherit these settings from the directory it is created in; selecting a different choice will override this default.

Interior pages use both the created PCF file from the wizard and the interior.xsl file to create the finished page. The content displayed on this page will be drawn from the created PCF file and related include files, such as the _props.inc breadcrumb file and the _nav.inc side navigation file.

 

New Page with News Item Wizard

When you want to create a new News page, you will want to choose the “News Page with RSS Item” picture, which is associated with the news.tcf. Information entered in the fields that are then shown will be used to create the News page. The Page Title, Keywords, Description and Content will be inserted into the created PCF file, which holds the content for the new page.

If you choose to “Add Navigation Item”, a link to the page will be automatically added to the side navigation file for the section that the new Landing page is created in.

The RSS feed that will be associated with the created item is the main news feed by default, but another feed may be selected if desired. The Media Title, Image, Thumbnail, Media Description, and Media Keywords all populate the new RSS feed item with the information you provide. Any other information that will be in the RSS feed item will be taken from other information you have entered, such as the title.

You must also give each new News page a name using only letters, numbers and underscores. Note that there is a .pcf extension automatically entered in. This ensures that a PCF file is created correctly, which will then be used with an XSL file to create the page the user will view upon production. When you change the name from “untitled.pcf” to the name you would like the new page to have, remember to leave the “.pcf” extension so that the new page is created correctly. Thus, if you wish to create a page named “news_article”, you need to change the field to show “news_article.pcf” before you continue.

If you wish to create a page with the same name as an existing page, you must check the box to overwrite the new page to replace the old page with the new one.

You may also choose to restrict access to who can edit the new News page by updating the “New News Page Access” setting. By default this will inherit these settings from the directory it is created in; selecting a different choice will override this default.

News pages use both the created PCF file from the wizard and the interior.xsl file to create the finished page. The content displayed on this page will be drawn from the created PCF file and related include files, such as the _props.inc breadcrumb file and the _nav.inc side navigation file. In addition, a RSS item will be created using the information the user filled out. This RSS item will be published to the associated feed when the created page is published.

 

<include>filename</include>

Include files can be used within the TCF new page wizard files. This would be primarily helpful if there are common, repurposeable sections of TCF commands that may need to be used across many TCF files. Example: A selector list for the 50 states, or a selector list of countries.

These include files are external files which can be called by the TCF that needs to utilize that set of syntax content. There are a couple of important notes.

  1. The include file must have an extension of .inc. It cannot be a .tcf extension as it will then be included in the New File template selecting page and will result in an error if chosen.
  2. The include file must be in the same Templates directory as the the TCFs referencing the file/performing the inclusion or an error will result.
  3. The contents of the include file must be valid TCF command set(s).

The implemented UARK templates make good use of include files. Some of these files are commonly used in all TCFs, while others may only be shared between a couple of TCFs. The following is a description of UARK’s .inc files and their use, separated into variable, template and navigation sections.

 

Variables

The commonvars.inc file contains variables that are common to all TCFs. It should be included within the <variable-list> tags. The first variable, title, allows the user to specify a title for the page. The keywords and description variables allow the user to set meta information. The maincontent variable is generally used to allow the user to enter initial content that will be displayed in the main content area of the page. It appears to the user as a mini WYSIWYG editor similar to the large editor that is viewed when editing a region of a currently existing page. The autonavigation variable will allow the user to choose whether or not to add a link to the new page on a navigation file defined later in the TCF.

The sectionvars.inc file contains variables that are commonly used when creating new sections.

The deptvars.inc file contains variables that are used when creating new departments. The dirname variable will become the name of the directory that is created. The friendly variable will become the friendly name for the breadcrumbs for the created department.

The numcols.inc file has code that allows the user to decide how many columns the new page will have from a drop down menu.

The rss-vars.inc file contains variables that are used for RSS feeds. The rss-feed variable allows you to specify a path to the RSS feed the page will be associated with. The mtitle variable allows you to specify a title for the media the feed will use. The murl variable allows you to choose an image to be associated with the RSS item that will be associated with the new page.

 

Template

The depttemplates.inc file contains templates that are used to create files common to all new departments. The _contact-info.tmpl will create an include file (_contact-info.inc) that appears under the side menu of each page in the department. The _main-nav.tmpl file will create an include file (_main-nav.inc) that makes up the main navigation menu at the top of each page in the department. The _site-header.tmpl will create an include file (_site-header.inc) which makes up the main header for all pages in the department.

The sectiontemplates.inc file contains templates that are used to create files common to all new sections. The _nav.tmpl will create the _nav.inc file that will hold the navigation which is shared across the created directory. The _props.tmpl will create a _props.inc file that is used to hold the friendly names for the breadcrumb elements for the section.

The landingtemplate.inc file contains the code to call the landing.tmpl file, which will create a new landing page.

 

Navigation

The navtemplate.inc file contains the code that is common to all TCFs. This code works with autonavigation so that a new navigation item can be rendered and appended to the specified file. The two navigation nodes have name attributes that are “true” and “false”. The node that will be used when creating a page will be determined by the value the user selects for the autonavigation variable. The value inside the selected node contains the code that will be appended to the specified file.