Icon Theme Properties

Last modified by Eleni Cojocariu on 2026/08/26 12:25

Reference

The content of an Icon Theme page is a properties file: one key = value per line, the settings below and the icon mappings in any order. Every value is evaluated as Velocity, with $icon holding the name being drawn, unless it takes one of the shapes that are substituted directly.

PropertyOptionalDescription
xwiki.iconset.typenoimage when each icon is a picture, font when each icon is a glyph selected by CSS classes.
xwiki.iconset.render.wikinoThe XWiki syntax that displays the icon.
xwiki.iconset.render.htmlnoThe HTML that displays the icon, used when the caller asks for HTML directly.
xwiki.iconset.icon.urlyesThe URL of the icon's picture, reported as the url metadata. Set it on an image theme.
xwiki.iconset.icon.cssClassyesThe CSS classes that select the icon's glyph, reported as the cssClass metadata. Set it on a font theme.
xwiki.iconset.cssyesThe URL of a stylesheet the icons need. Several URLs are separated by commas, so a comma inside a URL has to be written %2C.
xwiki.iconset.ssxyesThe reference of a page holding a Style Sheet Extension the icons need.
xwiki.iconset.jsxyesThe reference of a page holding a JavaScript Extension the icons need.

None of the three that are not optional has a default: without xwiki.iconset.type a request for an icon's metadata fails, and without the matching render template the icon is drawn as an empty string.

Examples

The bundled Font Awesome theme, a font theme pulling two stylesheets:

xwiki.iconset.type = font
xwiki.iconset.css = $services.webjars.url('org.webjars:font-awesome', 'css/all.min.css'),$services.webjars.url('org.webjars:font-awesome', 'css/v4-shims.min.css')
xwiki.iconset.render.wiki = {{html clean="false"}}<span class="fa fa-$icon" aria-hidden="true"></span>{{/html}}
xwiki.iconset.render.html = <span class="fa fa-$icon" aria-hidden="true"></span>
xwiki.iconset.icon.cssClass = fa fa-$icon

The bundled Silk theme, an image theme:

xwiki.iconset.type = image
xwiki.iconset.render.wiki = [[image:path:$xwiki.getSkinFile("icons/silk/${icon}.png")||alt="" data-xwiki-lightbox="false"]]
xwiki.iconset.render.html = <img src="$xwiki.getSkinFile("icons/silk/${icon}.png")" alt="" data-xwiki-lightbox="false" />
xwiki.iconset.icon.url = $xwiki.getSkinFile("icons/silk/${icon}.png")

Icon mappings

Every key that is not one of the settings above is read as a mapping from a name of the XWiki Icon Set to the value the templates substitute for $icon:

accept = check
add = plus
home = house

FAQ

Does the order of the lines matter?

No. The eight setting names are recognised exactly, and every other key is read as an icon mapping, so settings and mappings can be interleaved.

Get Connected