The tags.xml file in the cms/skins/[skinName]/conf folder is used to define charter tags.
For more information on how to use these labels, see the Chart labels page.
The labels defined in this file appear in the Graphic Charter category of the Labels panel of CMS.
The basic structure of the tags.xml file is :
tags.xml
Oops!
Copy to clipboard failed. Open the code and copy it manually.
<?xml version="1.0" encoding="UTF-8"?>
<tags>
<!-- Liste des étiquettes de charte -->
</tags>
<?xml version="1.0" encoding="UTF-8"?>
<tags>
<!-- Liste des étiquettes de charte -->
</tags>
<?xml version="1.0" encoding="UTF-8"?>
<tags>
<!-- Liste des étiquettes de charte -->
</tags>
Labels
Each label is defined by :
a unique identifier (uppercase characters without spaces),
an (internationalized) label,
an (internationalized) description,
a scope (target attribute): "PAGE" for a page label or "CONTENT" for a content label
visibility: the private attribute is used to privatize the label ("true" or "false" values). Private labels can only be assigned by "super" users with the appropriate rights.
a priority (fromAmetys 4.8 onwards): optional, used to order labels. The default value is 0. The higher the integer used, the higher the label will appear in the list. Negative integers are allowed to lower a label's priority relative to the default value.
Each label can contain sub-labels for prioritization.
Example of a tags file.xml
Oops!
Copy to clipboard failed. Open the code and copy it manually.
The example above defines 8 layout labels. All defined labels are page labels. The "Special pages" label is a "super" label with 5 sub-labels (Hidden page, Search page, ...). It has a negative priority to appear at the end of the graphic charter labels. The "Search page" label has a priority of 1 to appear before the other "Special pages" sub-labels.
This definition uses internationalization. For more information, see the Internationalization page (i18n).
Charter heritage
From Ametys 4.3.0
Missing file
As the generic inheritance rule indicates, if the file is absent, the file from the parent charter is used.
Heritage
If the file is present it will be mixed with the parent chart file according to the following rules:
Balise <tag> with an existing identifier in the parent charter :
The label can be removed using the remove="true" attribute.
You can change the value of the private attribute
On peut remplacer les balise <label> et <description>
On peut ajouter des sous-étiquettes <tag> à la liste existante des sous-étiquettes.
Balise <tag> avec un nouvel identifiant, l'étiquette est ajoutée.
Oops!
Copy to clipboard failed. Open the code and copy it manually.
<tags>
<tag id="SPECIAL_PAGES" target="PAGE"> <!-- référence une étiquette existante -->
<!-- label/description non retouché -->
<tag id="FOOTER_LINKS" target="PAGE" private="true"> <!-- référence une étiquette existante mais changement de la valeur de private -->
<label i18n="false">Nouveau label pour footer links</label>
<description i18n="false">Nouvelle description pour footer links</label>
</tag>
<tag id="SEARCH" target="PAGE"> <!-- référence une étiquette existante -->
<tag id="SUBSEARCH" target="PAGE"> <!-- nouvelle sous-étiquette -->
<label>label</label>
<description>description</description>
<tag>
</tag>
</tag>
<tag id="SUBSECTION" target="PAGE" remove="true"/> <!-- suppression d'une étiquette héritée -->
<tag id="MYTAG> <!-- nouvelle étiquette racine -->
<label>label</label>
<description>description</description>
</tag>
</tags>
<tags>
<tag id="SPECIAL_PAGES" target="PAGE"> <!-- référence une étiquette existante -->
<!-- label/description non retouché -->
<tag id="FOOTER_LINKS" target="PAGE" private="true"> <!-- référence une étiquette existante mais changement de la valeur de private -->
<label i18n="false">Nouveau label pour footer links</label>
<description i18n="false">Nouvelle description pour footer links</label>
</tag>
<tag id="SEARCH" target="PAGE"> <!-- référence une étiquette existante -->
<tag id="SUBSEARCH" target="PAGE"> <!-- nouvelle sous-étiquette -->
<label>label</label>
<description>description</description>
<tag>
</tag>
</tag>
<tag id="SUBSECTION" target="PAGE" remove="true"/> <!-- suppression d'une étiquette héritée -->
<tag id="MYTAG> <!-- nouvelle étiquette racine -->
<label>label</label>
<description>description</description>
</tag>
</tags>
<tags>
<tag id="SPECIAL_PAGES" target="PAGE"> <!-- référence une étiquette existante -->
<!-- label/description non retouché -->
<tag id="FOOTER_LINKS" target="PAGE" private="true"> <!-- référence une étiquette existante mais changement de la valeur de private -->
<label i18n="false">Nouveau label pour footer links</label>
<description i18n="false">Nouvelle description pour footer links</label>
</tag>
<tag id="SEARCH" target="PAGE"> <!-- référence une étiquette existante -->
<tag id="SUBSEARCH" target="PAGE"> <!-- nouvelle sous-étiquette -->
<label>label</label>
<description>description</description>
<tag>
</tag>
</tag>
<tag id="SUBSECTION" target="PAGE" remove="true"/> <!-- suppression d'une étiquette héritée -->
<tag id="MYTAG> <!-- nouvelle étiquette racine -->
<label>label</label>
<description>description</description>
</tag>
</tags>
Blocking inheritance
By default, inheritance applies, but if the file has the attribute inherit="false", then only the local file is used.
Oops!
Copy to clipboard failed. Open the code and copy it manually.