This page deals with site map icons and decorators for versions Ametys 4 .4 and higher.
For versions Ametys 4.3 and lower go to Site map icons and decorators (Ametys 4 .3)
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, redirect page, limited access page, published online, etc.
The icons and decorators available depend on your application.
Certain icons and decorators are provided by Ametys (e.g.: icon by page type (content, link or redirect), green icon for published pages, decorators for invisible pages, with scheduled publication, ...) and by certain plugins (e.g.: translated page).
You can also define your own icons/decorators in your graphic chart(s) (see below).
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.
|
|
To define additional icons, you need to define these icons in a skins/[SKIN]/conf/sitemap-icons.xml your graphic charter.
An icon is composed:
The order is important because only one icon will be associated with a page: it will be the first icon with the highest priority whose conditions match the page's properties. 0 is the highest priority.
There are 4 types of conditions.
Pour une condition sur le type de page (conteneur, lien ou nœud) on utilise <type> avec respectivement container, link ou node.
<!-- Type de page : container, link ou node--> <type>container</type>
For a condition relating to the labels on the page, we write:
<!-- 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>
For a condition relating to page metadata, write :
<!-- 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
Pour une condition sur le caractère publié de la page, on utilisera la balise <live/>
<live/>
Conditions may be cumulative. The page must meet all the conditions to be associated with the icon.
Generally, the icons provided by your graphic charter are the icons that depend on the labels defined by your charter.
Here's an example of a file used to add 2 icons:
<icons> <!-- Validated sections --> <icon> <order>5</order> <glyph>ametysicon-file94 validated</glyph> <conditions> <tags> <tag>SECTION</tag> </tags> <live /> </conditions> </icon> <!-- Sections --> <icon> <order>6</order> <glyph>ametysicon-file94</glyph> <conditions> <tags> <tag>SECTION</tag> </tags> </conditions> </icon> </icons>
To define additional decorators, you need to define these decorators in a skins/[SKIN]/conf/sitemap-decorators.xml your graphic charter.
Like icons, a decorator is composed:
The order of a decorator is irrelevant, as they are not exclusive.
Generally, the decorators provided by your graphic charter are decorators that depend on the labels defined by your charter.
Here's an example of a file used to add a decorator for pages labeled "Direct access" (DIRECTACCESS).
<decorators> <!-- Direct access --> <decorator id="direct_access"> <label i18n="true">PLUGINS_WEB_SITEMAP_DECORATOR_DIRECT_ACCESS</label> <glyph>ametysicon-link23</glyph> <conditions> <tags> <tag>DIRECTACCESS</tag> </tags> </conditions> </decorator> </decorators>