Last publication:23/02/2018at 2:45 PMCédricDamioli
Tags
In Ametys v3, the tags are hierarchical that means they can be classified in categories and sub categories. So they are presented in a tree.
The categories can not be affected to a page or a content, only the tags can be.
Tags providers
A tag provider is a provider of tags . There is differents providers :
- the skin provides the tags relatives to the navigation (section, footer, direct access, ....)
- the content types provides the tags relative to the content (news, focus, article, ...)
- ...
Static tags provider
This is a particular provider which is defined in plugin.xml as an extension point. To defined such a provider do this way :
Oops !
Copy to clipboard failed. Open the code and copy it manually.
<extension point="org.ametys.web.tags.TagProviderExtensionPoint"
id="org.ametys.modules.tags.SampleTagProvider"
class="org.ametys.web.tags.StaticTagProvider">
<label i18n="false">Statiques</label>
<description i18n="false">Ceci est une exemple de provider statique pouvant être défini dans une fichier 'plugin.xml'.</description>
<category id="MA_CATEGORY_1">
<label i18n="false">Ma catégorie 1</label>
<description i18n="false">Description de ma catégorie</description>
<tag id="TAG_1" target="CONTENT">
<label i18n="false">Tag 1</label>
<description i18n="false">Description du tag 1</description>
</tag>
<tag id="TAG_2" target="CONTENT">
<label i18n="false">Tag 2</label>
<description i18n="false">Description du tag 2</description>
</tag>
<category id="SOUS_CATEGORY">
<label i18n="false">Une sous catégorie</label>
<description i18n="false">Description de la sous catégorie</description>
<tag id="TAG_11" target="CONTENT">
<label i18n="false">Tag 1.1</label>
<description i18n="false">Description du tag 1.1</description>
</tag>
</category>
</category>
<category id="MA_CATEGORY_2">
<label i18n="false">Ma catégorie 2</label>
<description i18n="false">Description de ma catégorie</description>
<tag id="TAG_22" target="PAGE">
<label i18n="false">Tag 2</label>
<description i18n="false">Description du tag 2</description>
</tag>
</category>
</extension>
<extension point="org.ametys.web.tags.TagProviderExtensionPoint"
id="org.ametys.modules.tags.SampleTagProvider"
class="org.ametys.web.tags.StaticTagProvider">
<label i18n="false">Statiques</label>
<description i18n="false">Ceci est une exemple de provider statique pouvant être défini dans une fichier 'plugin.xml'.</description>
<category id="MA_CATEGORY_1">
<label i18n="false">Ma catégorie 1</label>
<description i18n="false">Description de ma catégorie</description>
<tag id="TAG_1" target="CONTENT">
<label i18n="false">Tag 1</label>
<description i18n="false">Description du tag 1</description>
</tag>
<tag id="TAG_2" target="CONTENT">
<label i18n="false">Tag 2</label>
<description i18n="false">Description du tag 2</description>
</tag>
<category id="SOUS_CATEGORY">
<label i18n="false">Une sous catégorie</label>
<description i18n="false">Description de la sous catégorie</description>
<tag id="TAG_11" target="CONTENT">
<label i18n="false">Tag 1.1</label>
<description i18n="false">Description du tag 1.1</description>
</tag>
</category>
</category>
<category id="MA_CATEGORY_2">
<label i18n="false">Ma catégorie 2</label>
<description i18n="false">Description de ma catégorie</description>
<tag id="TAG_22" target="PAGE">
<label i18n="false">Tag 2</label>
<description i18n="false">Description du tag 2</description>
</tag>
</category>
</extension>
<extension point="org.ametys.web.tags.TagProviderExtensionPoint"
id="org.ametys.modules.tags.SampleTagProvider"
class="org.ametys.web.tags.StaticTagProvider">
<label i18n="false">Statiques</label>
<description i18n="false">Ceci est une exemple de provider statique pouvant être défini dans une fichier 'plugin.xml'.</description>
<category id="MA_CATEGORY_1">
<label i18n="false">Ma catégorie 1</label>
<description i18n="false">Description de ma catégorie</description>
<tag id="TAG_1" target="CONTENT">
<label i18n="false">Tag 1</label>
<description i18n="false">Description du tag 1</description>
</tag>
<tag id="TAG_2" target="CONTENT">
<label i18n="false">Tag 2</label>
<description i18n="false">Description du tag 2</description>
</tag>
<category id="SOUS_CATEGORY">
<label i18n="false">Une sous catégorie</label>
<description i18n="false">Description de la sous catégorie</description>
<tag id="TAG_11" target="CONTENT">
<label i18n="false">Tag 1.1</label>
<description i18n="false">Description du tag 1.1</description>
</tag>
</category>
</category>
<category id="MA_CATEGORY_2">
<label i18n="false">Ma catégorie 2</label>
<description i18n="false">Description de ma catégorie</description>
<tag id="TAG_22" target="PAGE">
<label i18n="false">Tag 2</label>
<description i18n="false">Description du tag 2</description>
</tag>
</category>
</extension>
Skin tags provider
This is about the tags needed by the skin such as the tags relative to the navigation, to the css styles, ...
Those tags are defined in the skins/[skinName]/tags/tag.xml file.
To be used, this provider must be declared in plugin.xml. The plugin web do this, you do not have to declare it by yourself
Oops !
Copy to clipboard failed. Open the code and copy it manually.