BASICS

ADMINISTRATION

DEVELOPMENT

SUPER ADMIN

  LAST UPDATED
6/11/2013

TCF Reference

The TCF reference page includes the syntax for and examples of the elements, attributes, and attribute values used by template control files. These include the following:

TCF-created directories inherit the parent directory access settings by default unless set in the <directory> tag. The TCF attributes for <directory> can be used to allow the user to override the default inherit for the directory being created. New pages by default inherit from the directory’s access settings if created through a TCF. The TCF attributes for <template> can be used to allow the user to override the default inherit for the page being created.

As of release version 9.17.4, the following attributes were added for the <directory> element to allow the user to override the inherited value for access settings:

  • approver
  • publishers
  • rss-feed
  • toolbar
  • template-group

Additionally, the following attributes were added for <template>:

  • exclude-search
  • exclude-sitemap

The following access settings inherit inherently and do not include an attribute for a TCF override. Access settings can be changed from the default inherit on a page-by-page basis.

  • Enforce Approver
  • URL Type

This change in functionality deprecates the use of *inherit*. It no longer needs to be set to force an inherit from the parent directory access settings. It can still be used, but is no longer necessary.

 

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 content of the include file must be a valid TCF command set.

Syntax

<include> </include>

Example

<include>filename.inc</include>

The Includes element has no attributes.

Variable List

Contains the child node called variable, which define variables to be used throughout the new page creation process.

Syntax

<variable-list> </variable-list>

Example

<variable-list>
<variable name="pagetitle" prompt="Title" alt="New document title">Untitled</variable>
<variable name="template_path" display="no">/resources/xsl</variable>
</variable-list>

Attributes

This tag has no parameters.

Variable

The Variable node allows for the creation of variables to be used throughout the new page creation process. The variable tag is a child node of variable-list.

Syntax

<variable> </variable> 

Example

<variable name="pagetitle" prompt="Title" alt="New document title">Untitled</variable>

 

Attributes

  • alt

  • dependency

  • display

  • editor

  • filter

  • lockout

  • maxlength

  • name

  • output

  • path

  • prompt

  • rows

  • section

  • tags

  • type


 

Option

The Option tag can be used to allow for user input at the time of new page creation. Option is used within the <variable> node. Within the Option element, the Type attribute is used to specify the method of user interaction. For example, a type of select produces a drop-down menu. The possible choice of values is defined by <option> and the value attribute with the data. The user's choice for the value is echoed onto the page. The possible values for the Type attribute are text, select, filechooser, checkbox, radio, and asset.

Syntax

<option> </option>

Example

<variable name="color" type="select" prompt="Choose" alt="Choose a header color">
<option value="blue">Blue Text</option>
</variable>

 

Attributes

  • value

  • selected


 

Template List 

Template List contains child nodes which define templates to be used throughout the new page creation process.

Syntax

<template-list> </template-list>

Example

<template-list> 
  <template 
    prompt-prefix="New Document" 
    group="everyone" 
    filename="z-breadcrumb" 
    destination="{directory/}{dirname}"
    display-group="yes" 
    preferred-redirect="yes" 
    publish="no" 
    extension="pcf" 
    >z-breadcrumb.tmpl</template> 
  <template 
    group="everyone" 
    filename="index" 
    display-group="no" 
    display-destination="no" 
    display-filename="no" 
    display-overwrite="no" 
    preferred-redirect="yes" 
    publish="no" 
    extension="pcf" 
    destination="{directory/}{dirname}" 
    force-destination="yes" 
    >newpcf.tmpl</template>
</template-list>
 

Attributes

This element does not contain attributes.

Template

Defines a template file (TMPL) and relevant parameters to be used during new page creation process. Files created from a TCF by default inherit parent directory values unless set with new values in the <template> tag.

Syntax

<template> </template>

Example

<template
prompt-prefix="New Document"
group="everyone"
filename="untitled"
display-group="yes"
rss-feed="*inherit*"
preferred-redirect="yes"
publish="no"
extension="pcf"
destination="{directory/}{dirname}"
>{selected_template}</template>

 

Attributes

  • approver

  • autonav

  • destination

  • directedit

  • display-filename

  • display-group

  • display-overwrite

  • exclude-sitemap

  • exclude-search

  • extension

  • filename

  • filename-alt

  • force-destination

  • group

  • name

  • overwrite

  • preferred-redirect

  • prompt-prefix

  • publish

  • publishers

  • rss-author

  • rss-description

  • rss-extra

  • rss-feed

  • rss-link

  • rss-media

  • rss-pubdate

  • rss-title

  • targets

  • toolbar



Directory List

Directory List contains the Parent and Directory child nodes and is used to create an empty directory in a new section. For example: /artdepartment/images.

Syntax

<directory-list>
<parent path="{directory/}{sectionname}>
<directory name="images">images</directory>
</parent>
<directory-list>

Example

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

 

Parent

Parent is a child node of Directory-List, and contains the Directory node.

Syntax

<parent></parent>

Example

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

 

Attributes

  • name

  • force-lowercase

  • path (required)


 

Directory

Directory is a child node of Parent, which is contained within Directory-List and used in the creation of a new section with an empty directory.

Syntax

<directory name="images">images</directory>

Example

<directory-list>
<parent name="name_path" force-lowercase="yes" path="/images">
<directory name="images_path" force-lowercase="yes" group="*inherit*" publish="yes">{directory/}{dirname}/rotator</directory>
</parent>
</directory-list>

 

Attributes

  • approver

  • exclude-search

  • exclude-sitemap

  • force-lowercase

  • group

  • name

  • publish

  • publishers

  • prompt-prefix

  • rss-feed

  • display-group

  • template-group

  • toolbar


 

Use with Predefined Variables

Directory can take a value that uses a variable and/or a string to specify a path location.

Examples

{directory/}{dirname}/rotator
{dirname}/images

Navigation List

Contains child nodes which define navigation to be used throughout the new page creation process.

Syntax

<navigation-list> </navigation-list>

Example

<navigation-list>
<navigation name="leftnav" path="subnav.inc" group="everyone" publish="yes">
<li>
<a href="{ox_autonav:shorturl}">
{navtitle}
</a>
</li>
</navigation>
</navigation-list>

This tag has no attributes.

Navigation

The Navigation element is a child node of the navigation-list element. It contains the structure of a new navigation item to be rendered and appended to the file specified via the path attribute.

Syntax

<navigation> </navigation>

Example

<navigation name="leftnav" path="subnav.inc" group="everyone" publish="yes">
<li>
<a href="{ox_autonav:shorturl}">
{navtitle}
</a>
</li>
</navigation>

 

Attributes

  • group

  • name

  • path

  • publish



Was this page helpful?

Additional Comments:


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

Procede to http://support.omniupdate.com/