Tags can be used to mark content and/or pages for easy retrieval in other contexts, or to treat them differently. There are several types of tags, which are not used in the same way.

  1. Label types
    1. Applications
    2. Graphic charter
    3. Customized
  2. How do you define a label?
  3. How do I use a label?
    1. Page labels
    2. Content tags

Label types


These labels are supplied by the extension point org.ametys.web.tags.TagProviderExtensionPoint in the plugin.xml. They are generally used by services. For example, plugin Glossary provides a page tag to determine which page contains the glossary, so that each definition can be redirected to it.

Graphic charter

Graphic charter labels are mainly used to influence the charter by labeling a page or content. For example:

  • to make a page invisible in the menus or site map,
  • to build menus and submenus,
  • to select the pages to appear in the footer,
  • to assign a color variation to a page,
  • to highlight specific content,
  • not to display a content title,
  • etc ...

They are defined in a XML file called tags.xml is located in the cms/skins/[skinName]/conf/ folder.


Custom tags are defined by the contributor. In this way, they can classify content or pages according to their choice, and create content or page feeds based on this data. These labels are created using the Labels tool.

How do you define a label?

A label has several components:

  • Identifier

Name: id
Possible values: Uppercase characters with no spaces.
Description: The identifier uniquely identifies the label. Two categories or labels cannot have the same identifier.

  • Wording

Name: label
Possible values: keys i18n with or without catalog or directly a text
Note: The label node can contain the attribute i18n="true/false" to indicate whether it is a label i18n or a text.
Description: The label will be displayed in the list of available labels.

  • Description

Name: description
Type: node
Possible values: keys i18n with or without catalog or directly a text
Note: The label node can contain the attribute i18n="true/false" to indicate whether it is a label i18n or a text.
The description corresponds to the label's tooltip in the list of available labels.

  • Range

Name: target
Possible values:
page, content
A label can be applied to a content or a page, in order to define its scope, the correct value must be assigned to the target attribute.

  • Visibility

Name: private
Possible values:
true, false
Default value:
There are several rights, including the right to assign private labels. A contributor who does not have this right will not be able to assign a label of this type. However, he/she can view it, in particular to create reports.


<tag id="FOOTER_LINKS" target="PAGE" private="true">
    <description i18n="true">SKIN_BO_TAGS_CAT_SPECIALPAGES_TAG_FOOTERLINK_DESCRIPTION</description>

Labels can be hierarchical: a label can contain one or more daughter labels.

For more details on defining a graphic charter label, see tags.xml.

How do I use a label?

Page labels

Page labels can be used in filters, defined in cms/skins/[skinName]/templates/[templateName]/filters/default.xml. In this case, the returned data is already sorted according to the selected labels.

It is also possible to read page tags in the sitemap, for example, to create the menu. In this case, the SECTION label (label identifier) is searched for in the sitemap pages. These represent the menus. In the sitemap, all tags are prefixed by PLUGINS_TAGS_.

For example:

    <xsl:for-each select="/cms/sitemap//page[@PLUGIN_TAGS_SECTION]">
        <li><a href="{$site-uri-prefix}/{$lang}/{@sitemap:path}.html"><xsl:value-of select="@sitemap:title"/></a></li>

It's also possible to retrieve a tag from the current page without using the sitemap, via the page's tags. For example, you can hide the sub-menu of the current page as follows:

<xsl:if test="not(/cms/page/tags/NO_MENU)">
    <!-- Création du sous-menu -->

Content tags

Content tags are retrieved each time content is generated, regardless of the view selected. Tags are found in the content's tags tag. To retrieve tagged content, proceed as follows:

<xsl:if test="not(tags/WITHOUT_TITLE)">
    <h1><xsl:value-of select="title"/></h1>
Back to top