Knowledge Base

T4 Tags: Misc

Last Modified:
25 Apr 2023
User Level:
Power User

Available from the Content Type and Page Layout tag builder.

Title (type="title")

<t4 type="title" />

The T4 title tag is most frequently placed within the <title> and </title> fields in a Page Layout. When a channel is published, the tag is replaced with the name of the current section as specified within the Site Structure.

Optional attributes

There are additional attributes you can add to this T4 tag. They enable an element from within a Content Item to be appended to the page title on "fulltext" pages.

 

Attribute Example Description
title title="Sample Company Website - " Prepends the text to the name of the current section
append-content append-content="true" Append information about the current content item (used on fulltext pages)
append-element append-element="element-name" The element to be appended (on fulltext pages)
separator separator=":- " The text to be output between the current section name and current content item text (used on fulltext pages)

Standard example

<title>Sample Company Website - <t4 type="title" /></title>

<title><t4 type="title" title="Sample Company Website - " /></title>

If the current section name is "Services" then the output based on the previous two examples will be

<title>Sample Company Website - Services</title>

Fulltext example using optional attributes

<t4 type="title" append-content="true" append-element="Title" separator=":- " />

In the example above, "append-content" is set to true so on fulltext pages, information about the content should be appended to the page title.

The "append-element" attribute is set to "Title" so the content of the "Title" element will be output. If the "append-element" attribute is not specified, the "name" of the content is used.

Image, media, file and Section links cannot be mapped

The "separator" attribute has been set to ":- " so the standard title and the content specific information is separated by ":- ". If not specified, the default value for this attribute is ": ".

Title on index (type="title-on-index")

This is used on Page Layouts only and shows the name of the section on the index page but not on the fulltext page. This is displayed on preview and on publish.

Standard example

<t4 type="title-on-index" />

Before and after code example

<t4 type="title-on-index" before="<h2>" after="</h2>" />

Edit page (type="edit-page")

The "edit-page" T4 tag is used to create a link on a page of your site, to edit the content within TERMINALFOUR.

For the edit-page T4 tag to work, the context_url configuration option needs to be set.

Attributes

AttributeExampleDescription
action action="direct-edit"

Determines what action is taken in TERMINALFOUR:

text text="Edit this page" Determines the text used when creating the link

Examples

Link to create content

<t4 type="edit-page" action="add" text="add/create" />

Link to edit content

<t4 type="edit-page" action="modify" text="modify/edit" />

Link to edit content with Direct Edit

<t4 type="edit-page" action="direct-edit" text="edit with direct edit" />