Site map icons and decorators (Ametys 4.3)


This page deals with site map icons and decorators for versions Ametys 4 .3 and lower.
For versions Ametys 4.4 and higher, go to the Site map icons and decorators page .

Presentation

The role of icons and decorators is to provide information on the nature or status of the page in the site map: main heading, direct access, redirection page, limited access page, published online, etc.

The icons and decorators available depend on your application. They are defined in the configuration file WEB-INF/param/sitemap-icons.xml. This is the default configuration.
Each graphic charter can replace the default configuration with its own configuration file. skins/[nom_skin]/conf /sitemap hey -icons.xml.

File structure sitemap-icons.xml is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<sitemap>
<icons>
<!-- Ici la liste des icônes -->
</icons>

<decorators>
<!-- Ici la liste des décorateurs -->
</decorators>
</sitemap>

In the sitemap tool, icons correspond to the icon to the left of the page title, while decorators correspond to the icons to the right of the page title.

Define icons and decorators for your pages

Icon declaration

To define an icon you must define:

  • the path to the image file. Image dimensions must be 18 x 18 pixels.
  • conditions on page type, labels, page metadata to display this icon
<icon>
<!-- Chemin du fichier image (16x16 pixels) -->
<image plugin="pluginName">img/path/to/icon.png</image>
<conditions>
<!-- Type de page : container, link ou node-->
<type>container</type> 
<!-- Condition sur les étiquettes de la page : AND ou OR. AND par défaut-->
<tags type="AND"> 
<tag>TAG_KEY_1</tag> <!-- Clé de l'étiquette -->
<tag>TAG_KEY_2</tag>
</tags>
<!-- Condition sur les métadonnée de la page : AND ou OR. AND par défaut-->
<metadata type="OR"> 
<metadata name="path/to/metadata1">value1</metadata> <!-- Test si 'metadata1' est égale à 'value1' '-->
<metadata name="path/to/metadata2"></metadata> <!-- Utiliser une valeur vide pour tester l'existance d'une métadonnée -->
</metadata>
<live /> <!-- La balise live signifie que la page est publiée (en ligne) -->
</conditions>
</icon>

There is only one icon per page. The icon that will be used for a given page will be the first icon in the order of declaration in the file for which all conditions are met.  

Example 1: icon for a main section published on the site

<icon>
<image plugin="default-sitemap">img/icons/section_online.png</image>
<conditions>
<tags>
<tag>MAIN_SECTION</tag>
</tags>
<live/>
</conditions>
</icon>

Example 2: icon for a "blank" page published on the site

<icon>
<image plugin="default-sitemap">img/icons/page_blank_online.png</image>
<conditions>
<type>node</type>
<live/>
</conditions>
</icon>

Decorator's statement

The declaration of a decorator is similar to the declaration of an icon.
You'll also need to add a label.
The size of the image must be 14 x 14 pixels.

<decorator>
<!-- Libellé -->
<label i18n="true">plugin.pluginName:I18N_KEY</label>
<!-- Chemin du fichier image (14x14 pixels -->
<image plugin="pluginName">img/path/to/icon.png</image> <!-- the icon path -->
<conditions>
<!-- Type de page : container, link ou node-->
<type>container</type> 
<!-- Condition sur les étiquettes de la page : AND ou OR. AND par défaut-->
<tags type="AND"> 
<tag>TAG_KEY_1</tag> <!-- Clé de l'étiquette -->
<tag>TAG_KEY_2</tag>
</tags>
<!-- Condition sur les métadonnée de la page : AND ou OR. AND par défaut-->
<metadata type="OR"> 
<metadata name="path/to/metadata1">value1</metadata> <!-- Test si 'metadata1' est égale à 'value1' '-->
<metadata name="path/to/metadata2"></metadata> <!-- Utiliser une valeur vide pour tester l'existance d'une métadonnée -->
</metadata>
<live /> <!-- La balise live signifie que la page est publiée (en ligne) -->
</conditions>
</decorator>

A page can have several decorators.

Example 1: a decorator indicating a private or restricted-access page

<decorator>
<label i18n="true">plugin.default-sitemap:PLUGIN_DEFAULT_SITEMAP_DECORATOR_LIMITED_ACCESS</label>
<image plugin="default-sitemap">img/icons/private.png</image>
<conditions>
<metadata type="OR">
<metadata name="granted-users"></metadata>
<metadata name="granted-groups"></metadata>
</metadata>
</conditions>
</decorator>

Example 2: A decorator indicating a tagged page as a direct-access page

<decorator>
<label i18n="true">plugin.default-sitemap:PLUGIN_DEFAULT_SITEMAP_DECORATOR_DIRECT_ACCESS</label>
<image plugin="default-sitemap">img/icons/direct_access.png</image>
<conditions>
<tags>
<tag>DIRECT_ACCESS</tag>
</tags>
</conditions>
</decorator>
Back to top