Knowledge Base

T4 tags: Metadata (type="meta")

Last Modified:
14 Jan 2019
User Level:
Power User

Available from the Page Layout tag builder. This creates tags based on the settings that have been configured under Assets > Metadata.

There is also a T4 Meta tag for use with Content Types.

The tag is as follows:

<t4 type="meta" id="19" />

This generates the full meta tag on the page. As an example:

<meta name="keywords" content="web content management system, cms, wcms, website content management, mobile" />

To output just the "content" of the meta tag, use a Section META Info navigation object.

List values and names

If the special Metadata Mappings are mapped to List Elements, the Meta T4 tag can specify whether to use the Value or Name of the List entry by using the display_field attribute:

<t4 type="meta" ID="5" display_field="name" />

OR

<t4 type="meta" ID="5" display_field="value" />

This effects the three separate List content elements in the following way:

  • Cascading List: The list entry value is displayed by default. So if the attribute is missing, the value is published. i.e. the value is published in all cases except when display_field="name" is added.
  • Multiple Select: The list entry value is displayed by default. So if the attribute is missing, the value is published. i.e. the value is published in all cases except when display_field="name" is added.
  • Multi-select List: The list entry name is displayed by default. This is in keeping with how this content element is currently published, and the default does not change for backwards compatibility reasons.

Sections with Fulltext Content

Where sections contain Fulltext content, the T4 Meta tag can be configured to determine whether the Metadata entered in Fulltext content is displayed on the index page by using the output_to_index or include_content_on_index attributes. In all cases the fulltext page contains the section metadata and the metadata for this particular Content Item. The fulltext page does not include meta information added for other Content Items in the same section.

The output_to_index attribute can be added to the T4 tag with a value of either true or false. For example:

<t4 type="meta" ID="5" output_to_index="false" />

If set to false, the index page does not include any meta data tag. The fulltext page contains the section metadata and the metadata for this particular Content Item. The fulltext page does not include meta information added for other Content Items in the same section.

If set to true, or left blank, the index page includes section metadata and metadata for all content within the section. The fulltext page contains the section metadata and the metadata for this particular Content Item. The fulltext page does not include meta information added for other Content Items in the same section.

The include_content_on_index attribute can be added to the T4 tag with a value of either true or false. For example:

<t4 type="meta" ID="5" include_content_on_index="false" />

If set to false, the index page only includes section metadata and does not include any content metadata. The fulltext page contains the section metadata and the metadata for this particular Content Item. It does not include meta information added for other Content Items in the same section.

If set to true, or left blank, the index page includes section metadata and metadata for all content within the section. The fulltext page contains the section metadata and the metadata for this particular Content Item. It does not include meta information added for other Content Items in the same section.

The output_to_index overrides the include_content_on_index tag, so, if you set output_to_index to false and the include_content_on_index to true the meta tag is not generated on the index page.