Create an Icon Theme

Last modified by Eleni Cojocariu on 2026/08/25 11:03

Steps

Add an Icon Theme to a wiki by creating one page that maps each name of the XWiki Icon Set to the picture or the glyph that draws it.

  1. Create a terminal page for the theme in the IconThemes space
  2. Enter the theme's settings as the page content, one key = value per line
    xwiki.iconset.type = font
    xwiki.iconset.css = $services.webjars.url('org.webjars:font-awesome', 'css/all.min.css')
    xwiki.iconset.render.wiki = {{html clean="false"}}<span class="fa-solid fa-$icon" aria-hidden="true"></span>{{/html}}
    xwiki.iconset.render.html = <span class="fa-solid fa-$icon" aria-hidden="true"></span>
    xwiki.iconset.icon.cssClass = fa-solid fa-$icon
  3. Map each icon name of the Icon Set below the settings, in the same form
    accept = check
    add = plus
    home = house
  4. Save the page
  5. Add an IconThemesCode.IconThemeClass object to it, and set the object's name property to the name the theme is chosen and referenced by

    icon-theme-object.png

  6. Check that the administration now offers the theme under that name, ready to be selected for the wiki, as follows:

    icon-theme-selector.png

FAQ

Does the theme's page have to be in the IconThemes space?

No. XWiki finds a theme by looking for pages carrying an IconThemesCode.IconThemeClass object, wherever they sit; the IconThemes space is a convention that keeps them together.

Why does one icon of my theme not render?

Either the theme has no mapping for that name, and the fallback draws it instead, or the mapped value is not valid Velocity, since every value is evaluated before being used.

More

To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.

Get Connected