TCF Attributes Reference Guide
Template Control Files (TCFs) are the forms that users see when creating new content.
PrologLink to this section
The prolog is defined at the start of the TCF and include and XML declarations.
XML Declaration
Declares the version and default character encoding of XML used in the document.
<?xml version="1.0" encoding="UTF-8"?>
After the XML declaration, a root node of <tcf>
is used to wrap the remainder of the TCF document.
<tcf>
<template-list>
<template prompt-prefix="New File" extension="inc" publish="no" no-publish="no" exclude-sitemap="yes" exclude-search="yes">newfile.tmpl</template>
</template-list>
</tcf>
IncludeLink to this section
A TCF can call a local include file to be part of the form, useful for common sections that multiple TCFs might use. The include file must have a .inc
extension, be in the same folder as the TCFs referencing it, and the content must be a valid TCF command set.
VariablesLink to this section
Each variable creates a form field for users to answer. The parent node, <variable-list>
, contains all <variable>
tags.
<variable-list>
<variable name="pagetitle" prompt="Title" alt="New document title">Untitled</variable>
<variable name="template_path" display="no">/resources/xsl</variable>
</variable-list>
System Level Variable
To populate the Breadcrumb of a folder that is created with a TCF, you need to use a variable that is defined by the system.
<variable name="cmsBreadcrumbName" prompt="Section Title" alt="Enter a friendly name for the section's title and/or breadcrumb."></variable>
Common Attributes
- type (required): specifies the kind of variable. Options are "asset," "checkbox," "date," "datetime," "filechooser," "radio," "select," "tag," "text," "textarea," and "time."
- section: set a heading for a group of fields.
- name (required): unique identifier for the variable.
- prompt (required): the label for the field that appears in the form.
- alt: the helper text for the field that appears in the form.
- display (yes/no): whether or not the form field appears to users. If not, the initial value defined for the variable is used.
Elements
Form Field | Attributes | Example Code |
---|---|---|
Asset Chooser The user selects an asset. |
<variable> attributes:
|
|
Checkbox The user selects one or more options from a checkbox list. | <variable> attributes:
<option> attributes:
|
|
Date Picker The user selects a date. | <variable> attributes:
|
|
Date/Time Picker The user selects a date and time. |
<variable> attributes:
|
|
Filechooser The user selects a file from within the Modern Campus CMS site. |
<variable> attributes:
|
|
Radio The user selects one option from a radio buttons list. |
<variable> attributes:
<option> attributes:
|
|
Select The user selects one option from a dropdown list. |
<variable> attributes:
<option> attributes:
|
|
Tag The user enters one or more tags to be applied to the page. |
<variable> attributes:
|
|
Text The user enters text into a field. |
<variable> attributes:
|
|
Time Picker The user selects a time. |
<variable> attributes:
|
|
For elements with option
attributes, the value of the option chosen by the user is passed to the appropriate variable in the TMPL. These elements can maintain the form field type, rather than converting it to text, if <option>
tagging is preserved in the PCF. Do this by specifying the output method as output="xml"
in the TCF variable definition. The corresponding node in the TMPL must then include in its echo var
statement the attribute to turn off output encoding. This outputs all the option nodes, instead of just the value.
The group
attribute for restricting access is not applicable to individual variables.
TemplateLink to this section
The <template-list>
node contains child <template>
nodes that define which TMPL files are used to make new content.
<template-list>
<template
destination="{new-folder}"
force-destination="yes"
publish="no"
filename="_nav"
extension="inc"
display-filename="no"
display-group="no"
display-overwrite="no"
no-publish="no"
exclude-sitemap="yes"
exclude-search="yes">navigation.tmpl</template>
<template
destination="{new-folder}"
force-destination="yes"
publish="no"
filename="_props"
extension="pcf"
display-filename="no"
display-group="no"
display-overwrite="no"
no-publish="yes"
exclude-sitemap="yes"
exclude-search="yes">properties.tmpl</template>
<template
destination="{new-folder}"
force-destination="yes"
publish="no"
filename="index"
extension="pcf"
tags="{category-tags}, featured"
display-filename="no"
display-group="no"
display-overwrite="no"
no-publish="no"
exclude-sitemap="no"
exclude-search="no">news-listing.tmpl</template>
</template-list>
To populate attributes with user-entered data from the TCF, use {variable_name}
as the value.
Attribute Example | Function | Values |
---|---|---|
|
Assigns a content approver to the created file. |
The name of the user in Modern Campus CMS, or "none" |
|
Used in conjunction with the navigation tag in the navigation-list. |
Value of which navigation settings to use from the navigation-list |
|
Sets a location for new files (other than the current folder). |
The root relative staging path to where the file will be placed on creation. |
|
Determines whether the user making the new file can set the filename. This is commonly turned off for files with standardized naming conventions, such as navigation files. |
yes/no |
| Displays all groups the user creating the content belongs to, so that the user can assign access to a group |
yes/no |
| Determines whether the user can overwrite existing files. |
yes/no |
| Determines whether the created file is indexed for global search. |
yes/no |
| Determines whether the created file is included in the sitemap. |
yes/no |
| Sets the file extension of the resulting file. Used in conjunction with filename . |
The file extension |
| Sets the default name of the created file. Used in conjunction with extension . |
Text string |
| Sets the default text for the filename form field. |
Text string |
| Used in conjunction with destination . If yes, creates folders specified by destination if they don't already exist. |
yes/no |
| Sets an access group for the file. |
The name of a group (case-sensitive) |
| Uniquely identifies template. If prompt-prefix is omitted, the value of this parameter will be used. | The name of a the template |
| Determines whether the administrator can disable publish actions for a file. | yes/no |
| If yes, overwrites any existing file with the same name. |
yes/no |
| Routes the user directly to the specified file for editing once the content is created. |
yes/no |
| Adds the prefix to helper text in the TCF, to specify which file is being modified with the following settings. |
Text string |
| Determines if the file created automatically publishes on creation. |
yes/no |
| Indicates the group that bypasses the approver . |
The name of a group (case-sensitive) |
| Names the author of an RSS item associated with the file creation. |
Text string |
| Describes an RSS item associated with the file creation. |
Text string |
| Populates the RSS item node with additional XML. |
String XML nodes |
| Determines the RSS feed to which the newly created file belongs. |
Root-relative path of the RSS feed. Can use |
| Defines the RSS link to be provided by a TCF variable. |
The |
| Populates the RSS item node with additional XML. |
A delimited string defining the number of media RSS items and the value of each item parameter. The |
| Populates the RSS item's publish date with content from a TCF variable. |
The date or [auto] |
| Adds tags to the RSS item. |
List of tags, comma-separated |
| Populates the RSS item's title node with content provided by a TCF variable. |
Text string |
| Adds tags to the new page. Use the variable name of the Tags form field in the TCF to pull in the user-entered tags. |
List of tags, comma-separated |
| Used in conjunction with publish to specify publish target(s) for the file autopublish. If not used, the production server is the default publish target. |
Comma-separated publish target names, if you want to publish the regular publish you must include that site name as well |
| Determines the custom toolbar used for the created file. |
The toolbar name, or "Default" |
DirectoryLink to this section
The <directory-list>
node contains the <parent>
child node, which then contains the <directory>
child node. It creates a new folder.
New sections are created via TCFs that create both a new folder and new files by using both <template-list>
and <directory-list>
.
<directory-list>
<parent path="{directory/}{sectionname}">
<directory name="images">images</directory>
</parent>
</directory-list>
Any attributes can be populated with user-entered data from the TCF by using {variable_name}
as the value.
Parent
Attribute Example | Function | Values |
---|---|---|
name="variable_name" | unique identifier for the parent tag | Text string |
path="/path-name" | The location where the new folder will be created. . means the current folder | . or /path-name |
Directory
Attribute Example | Function | Values |
---|---|---|
approver="jmiller" | Assigns a content approver to the created folder. | The name of the user in Modern Campus CMS, or "none" |
exclude-search="no" | Determines whether the contents of the created folder are indexed for global search. | yes/no |
exclude-sitemap="no" | Determines whether the created file is included in the sitemap. | yes/no |
filtered-tags="humanities, literature, english" | Sets filtered tags for the new folder. | Comma-separated tags |
filtered-tags-type="allow" | Determines whether the filtered-tags values are allowed or disallowed. | Allow/Disallow |
fixed-tags="theater, arts" | Sets fixed tags for the new folder. | Comma-separated tags |
force-lowercase="yes" | Sets the folder name to be lowercase, regardless of how it is entered. | yes/no |
group="Content Admins" | Sets an access group for the file. | The name of a group(case-sensitive) |
name="images" | Sets the name of the new folder. | Text string |
publish="yes" | Publishes the folder automatically on creation. | yes/no |
publishers="Directors" | Sets the bypass approval group for the folder. | The group name or "none." |
prompt-prefix="New Section" | Adds the prefix to helper text in the TCF, to specify which file is being modified with the following settings. | Text string |
rss-feed="*inherit*"" | Determines the RSS feed to which the newly created file belongs. | Root-relative path of the RSS feed. Can use *inherit* to inherit to the current access settings RSS Feed |
template-group="Faculty Directory" | Sets a template group for the new folder. | The template group name, or "None" |
toolbar="Basic" | Determines the custom toolbar> used for the created file. | The toolbar name, or "Default" |
This node can also take a value that uses a variable and/or string to specify a path location, for example {directory/}{dirname}/images
.
NavigationLink to this section
The <navigation-list>
node contains the <navigation>
child node. It creates a new item in the associated navigation file.
Attribute Example | Function | Values |
---|---|---|
group="Everyone" | Overrides the Access Group on the navigation file. This take effect each time a navigation item is made when a new file is created. | Text string |
name="leftnav" | Navigation identifier used in conjunction with the template's autonav attribute. | Text string |
path="_nav.inc" | Path to the navigation file where the new navigation item should be rendered. | File name |
publish="yes" | Publishes the navigation file automatically on addition of the item. | yes/no |