Icon Macro
Macro to display icons. |
Type | JAR |
Category | Macro |
Developed by | |
Rating | |
License | GNU Lesser General Public License 2.1 |
Bundled With | XWiki Standard |
Compatibility | XWiki 14.10.x since 14.10.6, >= 15.2 RC1 |
Table of contents
Description
The icon macro displays an icon of the current icon set or a chosen icon set, with an optional fallback to the default icon theme when the icon doesn't exist. It can be used to add icons to UI elements and, e.g., also for documentation purposes to show which icon a user needs to click.
Usage
The basic usage is to just specify an icon name to display an icon from the current icon theme, all other parameters are optional. Refer to the documentation of the icon theme application for a list of icons and icon sets.
From WYSIWYG Editor
From Wiki Syntax
Example output:
Parameter definitions
Name | Optional | Allowed values | Default value | Description |
---|---|---|---|---|
name | no | an icon's name | The name of the icon. See the icon theme application for available icons. | |
iconSet | yes | an icon set's name | the current icon set | The name of the icon set. See the icon theme application for available icon sets. |
fallback | yes | true/false | true | If the icon shall be loaded from the default icon set when the icon or icon set is not available, true by default. |
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).
You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.
Dependencies
Dependencies for this extension (org.xwiki.platform:xwiki-platform-icon-macro 16.10.1):
- org.xwiki.platform:xwiki-platform-icon-api 16.10.1
- org.xwiki.platform:xwiki-platform-bridge 16.10.1
- org.xwiki.rendering:xwiki-rendering-transformation-macro 16.10.1
- org.xwiki.platform:xwiki-platform-model-api 16.10.1
- org.xwiki.platform:xwiki-platform-rendering-async-macro 16.10.1