Wiki source code of Create an Icon Theme

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

Show last authors
1 Add an [[Icon Theme>>doc:documentation.xs.admin.icons.icon-themes.WebHome]] to a wiki by creating one page that maps each name of [[the XWiki Icon Set>>doc:documentation.xs.admin.icons.icon-set.WebHome]] to the picture or the glyph that draws it.
2
3 1. [[Create a terminal page>>doc:documentation.xs.user.base.page.create.create-terminal-page.WebHome]] for the theme in the ##IconThemes## space
4 1. Enter [[the theme's settings>>doc:documentation.xs.dev.icons.create-icon-theme.icon-theme-properties.WebHome]] as the page content, one ##key = value## per line(((
5 {{code language="properties"}}
6 xwiki.iconset.type = font
7 xwiki.iconset.css = $services.webjars.url('org.webjars:font-awesome', 'css/all.min.css')
8 xwiki.iconset.render.wiki = {{html clean="false"}}<span class="fa-solid fa-$icon" aria-hidden="true"></span>{{/html}}
9 xwiki.iconset.render.html = <span class="fa-solid fa-$icon" aria-hidden="true"></span>
10 xwiki.iconset.icon.cssClass = fa-solid fa-$icon
11 {{/code}}
12 )))
13 1. Map each icon name of the Icon Set below the settings, in the same form(((
14 {{code language="properties"}}
15 accept = check
16 add = plus
17 home = house
18 {{/code}}
19 )))
20 1. Save the page
21 1. Add an ##IconThemesCode.IconThemeClass## object to it, and set the object's ##name## property to the name the theme is chosen and referenced by(((
22 {{image reference="icon-theme-object.png" size="extra" alt="The object editor of the theme page, with the name property of its Icon Theme Class object highlighted"/}}
23 )))
24 1. Check that the administration now offers the theme under that name, ready to be [[selected for the wiki>>doc:documentation.xs.admin.icons.icon-themes.select-icon-theme.WebHome]], as follows:(((
25 {{image reference="icon-theme-selector.png" size="large" alt="The icon theme field of the administration, highlighted, showing the newly created theme"/}}
26 )))

Get Connected