Last publication:23/02/2018at 2:51 PMCédricDamioli
This feature is only available for versions 3.2.1 or later
Presentation
The icons and decorators have to give informations on the nature of the page in sitemap : main section, direct access, page of redirection, private, ...
The available icons and page decorators depend on your application. They are defined in WEB-INF/param/sitemap-icons.xml configuration file. Each skin can override the default configuration by having its own configuration file skins/[skinName]/conf/sitemap-icons.xml.
The file structure is the following :
Oops !
Copy to clipboard failed. Open the code and copy it manually.
<?xml version="1.0" encoding="UTF-8"?>
<sitemap>
<icons>
<!-- Here is the list of icons -->
</icons>
<decorators>
<!-- Here is the list of decorators -->
</decorators>
</sitemap>
<?xml version="1.0" encoding="UTF-8"?>
<sitemap>
<icons>
<!-- Here is the list of icons -->
</icons>
<decorators>
<!-- Here is the list of decorators -->
</decorators>
</sitemap>
<?xml version="1.0" encoding="UTF-8"?>
<sitemap>
<icons>
<!-- Here is the list of icons -->
</icons>
<decorators>
<!-- Here is the list of decorators -->
</decorators>
</sitemap>
Define the available icons and decorators for your pages
Declare a sitemap icon
You need to define :
the path to icons. The image dimensions must be 18px x 16 px.
optionals conditions on type of pages, tags, metadata or published state
Oops !
Copy to clipboard failed. Open the code and copy it manually.
<icon>
<image plugin="pluginName">img/path/to/icon.png</image><!-- the icon path -->
<conditions>
<type>container</type> <!-- the type of page : container, link or node-->
<tags type="AND"> <!-- condition on tags : AND or OR. Default is AND -->
<tag>TAG_KEY_1</tag> <!-- tag key -->
<tag>TAG_KEY_2</tag>
</tags>
<metadata type="OR"> <!-- condition on metadata : AND or OR. Default is AND -->
<metadata name="path/to/metadata1">value1</metadata> <!-- test if 'metadata1' is equals to 'value1' '-->
<metadata name="path/to/metadata2"></metadata> <!-- use empty value to test if 'metadata2' exists -->
</metadata>
<live /> <!-- use tag live for pages online -->
</conditions>
</icon>
<icon>
<image plugin="pluginName">img/path/to/icon.png</image><!-- the icon path -->
<conditions>
<type>container</type> <!-- the type of page : container, link or node-->
<tags type="AND"> <!-- condition on tags : AND or OR. Default is AND -->
<tag>TAG_KEY_1</tag> <!-- tag key -->
<tag>TAG_KEY_2</tag>
</tags>
<metadata type="OR"> <!-- condition on metadata : AND or OR. Default is AND -->
<metadata name="path/to/metadata1">value1</metadata> <!-- test if 'metadata1' is equals to 'value1' '-->
<metadata name="path/to/metadata2"></metadata> <!-- use empty value to test if 'metadata2' exists -->
</metadata>
<live /> <!-- use tag live for pages online -->
</conditions>
</icon>
<icon>
<image plugin="pluginName">img/path/to/icon.png</image><!-- the icon path -->
<conditions>
<type>container</type> <!-- the type of page : container, link or node-->
<tags type="AND"> <!-- condition on tags : AND or OR. Default is AND -->
<tag>TAG_KEY_1</tag> <!-- tag key -->
<tag>TAG_KEY_2</tag>
</tags>
<metadata type="OR"> <!-- condition on metadata : AND or OR. Default is AND -->
<metadata name="path/to/metadata1">value1</metadata> <!-- test if 'metadata1' is equals to 'value1' '-->
<metadata name="path/to/metadata2"></metadata> <!-- use empty value to test if 'metadata2' exists -->
</metadata>
<live /> <!-- use tag live for pages online -->
</conditions>
</icon>
In sitemap, icons are located to the left of page name. There is only one icon per page.
The first icon matching conditions is used (in the order of declaration in the file).
Sample 1 : a icon for a published main section
Oops !
Copy to clipboard failed. Open the code and copy it manually.
The declaration of a decorator is quite the same. Add a label used for the icon tooltip.
The image dimensions must be 14px x 14 px.
Oops !
Copy to clipboard failed. Open the code and copy it manually.
<decorator>
<label i18n="true">plugin.pluginName:I18N_KEY</label> <!-- the icon tooltip -->
<image plugin="pluginName">img/path/to/icon.png</image> <!-- the icon path -->
<conditions>
<type>container</type> <!-- the type of page : container, link or node-->
<tags type="AND"> <!-- condition on tags : AND or OR -->
<tag>TAG_KEY_1</tag> <!-- tag key -->
<tag>TAG_KEY_2</tag>
</tags>
<metadata type="OR"> <!-- condition on metadata : AND or OR -->
<metadata name="path/to/metadata1">value1</metadata> <!-- test if 'metadata1' is equals to 'value1' '-->
<metadata name="path/to/metadata2"></metadata> <!-- use empty value to test if 'metadata2' exists -->
</metadata>
<live /> <!-- use tag live for pages online -->
</conditions>
</decorator>
<decorator>
<label i18n="true">plugin.pluginName:I18N_KEY</label> <!-- the icon tooltip -->
<image plugin="pluginName">img/path/to/icon.png</image> <!-- the icon path -->
<conditions>
<type>container</type> <!-- the type of page : container, link or node-->
<tags type="AND"> <!-- condition on tags : AND or OR -->
<tag>TAG_KEY_1</tag> <!-- tag key -->
<tag>TAG_KEY_2</tag>
</tags>
<metadata type="OR"> <!-- condition on metadata : AND or OR -->
<metadata name="path/to/metadata1">value1</metadata> <!-- test if 'metadata1' is equals to 'value1' '-->
<metadata name="path/to/metadata2"></metadata> <!-- use empty value to test if 'metadata2' exists -->
</metadata>
<live /> <!-- use tag live for pages online -->
</conditions>
</decorator>
<decorator>
<label i18n="true">plugin.pluginName:I18N_KEY</label> <!-- the icon tooltip -->
<image plugin="pluginName">img/path/to/icon.png</image> <!-- the icon path -->
<conditions>
<type>container</type> <!-- the type of page : container, link or node-->
<tags type="AND"> <!-- condition on tags : AND or OR -->
<tag>TAG_KEY_1</tag> <!-- tag key -->
<tag>TAG_KEY_2</tag>
</tags>
<metadata type="OR"> <!-- condition on metadata : AND or OR -->
<metadata name="path/to/metadata1">value1</metadata> <!-- test if 'metadata1' is equals to 'value1' '-->
<metadata name="path/to/metadata2"></metadata> <!-- use empty value to test if 'metadata2' exists -->
</metadata>
<live /> <!-- use tag live for pages online -->
</conditions>
</decorator>
In sitemap, decorators are located to the right of page name. A page can have several decorators.
Sample 1 : a decorator for a private page (limited access)
Oops !
Copy to clipboard failed. Open the code and copy it manually.