The extension point org.ametys.web.tags.TagProviderExtensionPoint defines a new label "supplier".

This is a multiple extension point: in other words, several implementations of this extension point can be active at the same time.

To date, there are 3 implementations of this extension point, defining 3 types of label:

  • org.ametys.web.tags.StaticTagProviderfor static labels. This is the supplier detailed here.

  • org.ametys.web.tags.SkinTagProviderfor graphic labels. See Charter labels
  • org.ametys.web.tags.jcr.JCRTagProvider for personalized labelsdefined by the contributor. See Labels

How do I create static labels?

The creation of static labels is useful in the following cases:

  • shared labels common to all sites and all graphic charters
  • have labels that cannot be modified by contributors

Static labels must be defined in the plugin.xml file of a plugin Ametys . If necessary, you may need to create a new plugin, then follow the instructions on the plugin Ametys Architecture page.

Below is a sample declaration:

Sample declaration

<extension point="org.ametys.web.tags.TagProviderExtensionPoint" 
           id="mytagprovrider" 
           class="org.ametys.web.tags.StaticTagProvider">
	<label i18n="true">PLUGINS_MYPLUGIN_TAG_CATEGORY_EVENTS</label>
    <description i18n="true">PLUGINS_MYPLUGIN_TAG_CATEGORY_EVENTS_DESC</description>
    <tag id="PROFESSIONAL_EVENTS" target="CONTENT>
		<label i18n="true">PLUGINS_MYPLUGIN_TAG_CATEGORY_PROFESSIONAL_EVENTS</label>
		<description i18n="true">PLUGINS_MYPLUGIN_TAG_CATEGORY_PROFESSIONAL_EVENTS</description>
		<tag id="EVENT_CONFERENCE" target="CONTENT">
        	<label i18n="true">PLUGINS_MYPLUGIN_TAG_CONFERENCE</label>
    		<description i18n="true">PLUGINS_MYPLUGIN_TAG_CONFERENCE_DESC</description>
    	</tag>
		<tag id="EVENT_SHOW" target="CONTENT" private="true">
        	<label i18n="true">PLUGINS_MYPLUGIN_TAG_SHOW</label>
    		<description i18n="true">PLUGINS_MYPLUGIN_TAG_SHOW_DESC</description>
    	</tag>
	</tag>
	<tag id="SPORT_EVENTS" target="CONTENT">
		<label i18n="true">PLUGINS_MYPLUGIN_TAG_CATEGORY_SPORT_EVENTS</label>
		<description i18n="true">PLUGINS_MYPLUGIN_TAG_CATEGORY_SPORT_EVENTS</description>
		<tag id="EVENT_TOURNAMENT" target="CONTENT">
        	<label i18n="true">PLUGINS_MYPLUGIN_TAG_TOURNAMENT</label>
    		<description i18n="true">PLUGINS_MYPLUGIN_TAG_TOURNAMENT_DESC</description>
    	</tag>
		<tag id="EVENT_EXHIBITION" target="CONTENT">
        	<label i18n="true">PLUGINS_MYPLUGIN_TAG_EXHIBITION</label>
    		<description i18n="true">PLUGINS_MYPLUGIN_TAG_EXHIBITION_DESC</description>
    	</tag>
	</tag>
</extension>

 

A tag is defined by :

  • a unique identifier ("id" attribute)
  • a scope: "CONTENT" for a content label, "PAGE" for a page label ("target" attribute)
  • visibility. The "private" attribute makes the label private. Private labels can only be assigned by "super" users with the appropriate rights.
  • un libellé (élément "<label>")
  • une description (élément "<description >")

Each label can contain sub-labels for prioritization.

 

Back to top