Glossary Application

Last modified by slauriere on 2024/01/15 00:12

cogGlossary feature for XWiki
Developed by

Sarthak Gupta, Vincent Massol, slauriere, Clément Aubin

Active Installs25
2 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager


The Glossary application has the following features:

  • Add a new Glossary entry (Currently supports only single word entries emoticon_smile, except when using the glossaryReference macro)
  • View and filter all existing Glossary entries
  • Search for Glossary entries
  • Glossary Transformation for the ability to create links if a glossary entry appears on a wiki page.
  • 1.1+ Glossary Reference Macro (glossaryReference) to link to a glossary entry
  • 1.1+ Automatically modify page content to add Glossary Reference Macros on save
  • 1.3+ Glossary Entries Macro (glossaryEntries) display every entry of a glossary in a document

1.1+ It is possible to create glossary entries and then translate these entries in the different languages configured on the wiki. When using the glossary transformation, only glossary entries that exist with the locale of the page will be transformed.

Main view:


Adding a new Glossary entry

Enter the glossary entry, that you want to add in the text box and click the "Add Glossary Item" button


On the next page add a description to the glossary entry. After that Save the page.


Viewing existing Glossary entries

Existing glossary entries are shown in the live table as shown below:


On clicking a glossary entry, you will be directed to the page associated with it.


Searching Glossary entries

Enter the entry you want to search in the search box as shown and click the "Search" button.


You will be directed to the search page where you will see the matching entry resuts.


Exporting the Glossary


It is possible to export every Glossary entry in a CSV file, containing the following columns :

  • The first column is the ID of the Glossary entry in XWiki
  • The second column is the title of the entry in the default wiki language
  • The third column is the content of the entry for the default wiki language
  • The next columns are respectively the title of the entry and then the content of the entry for each supported language in the wiki.

The export is available on the home page of each Glossary.

Multiple Glossaries

The default Glossary is located in the Glossary.WebHome page. There's currently no UI to create new glossaries and this feature can be considered as alpha quality for the moment.

It's possible to create other Glossaries by creating Glossary entries (i.e. wiki pages with a Glossary.Code.GlossaryClass xobject in it) in locations other than inside the top Glossary page.

For example, you could create a SecondGlossary.LOL terminal page and add a Glossary.Code.GlossaryClass xobject in it. This will define a LOL glossary entry that can then be referenced using the glossaryReference macro.

Note that the Glossary id is the name of the page inside which Glossary entries are created. For example if you create a SecondGlossary.LOL terminal page as shown above, the glossary id for this entry is SecondGlossary.

Current limitations:

Update documents to add glossary entries automatically


You can enable the application to automatically update documents at save time to look for glossary entries. With this strategy, if a word corresponds to a glossary entry when saving a document, it will be replaced by a glossaryReference macro with the adequate parameters.

Similarly, if a glossaryReference macro exists in a document being saved, and if the corresponding glossary entry does not exist anymore, the macro will be removed.

In order to enable this feature, check the option Update documents on save in the wiki administration, in the section "Content" > "Glossary".

1.4+ It is also possible to define a list of XWiki Classes that will automatically exclude pages from the transformation when an XObject of these classes is found on one of the pages.

Glossary Macro

The Glossary macro displays all the Glossary entries defined in pages which are immediate children of the non-terminal page where it's used.


For example:


Note that the Glossary Entries macro (see below) was added later on and is serving a similar purpose but with the following differences:

  • It supports several glossaries
  • It lists entries as a list and not as a table
  • It lists entries from a given glossary and not entries listed in the same space where it's used

Glossary Reference Macro

The Glossary Reference macro makes it possible to link explicitly a label to a glossary entry in a given glossary, using the following syntax:

{{glossaryReference glossaryId="MyGlossary" entryId="lorem"}}lorem{{/glossaryReference}}

The glossaryId parameter is optional, defaulting to "Glossary", while the entryId one is mandatory.

Glossary Entries Macro


The glossary entries macro will display every entry of a glossary as a list, ready to be embedded inside of a wiki document.

{{glossaryEntries glossaryId="MyGlossary" entryNameHeaderLevel="5"/}}

The glossaryId parameter is optional, defaulting to "Glossary". The entryNameHeaderLevel is also optional, defaulting to 2. It will define the heading level used when displaying the name of each glossary entry.

When a macro glossaryEntries macro is included in a page, all glossaryReference macros which are referencing to the glossary ID used for the glossaryEntries macro will be displayed as anchor links, pointing to the entries on the document instead of the entry pages on the wiki.

Glossary in action

As we have the word "LOL" as a glossary entry, it will appear as a link on any page in which it appears as shown below:


On clicking that link, you will be directed to that glossary page.


There are 2 modes that you can use:

  • "Transformation" mode: In this mode, the page content is parsed every time the page is viewed and links to glossary entries are generated on the fly. Advantage: no impact on the page content
    • Since this can cause performance issues, it's not recommended to use it on wikis have large page content.
    • To activate it, edit WEB-INF/, look for a property named rendering.transformations and make sure it's uncommented and contains the value glossary.

      For example:

      rendering.transformations = macro, icon, glossary

      Make sure you restart your XWiki instance for the change to take effect.

  • "Update on save" mode: In this mode, when the page is saved, the content is parsed to recognize glossary entries and the content is modified to add Glossary Reference macros. Advantage: much better performances

Release Notes

All release notes




The following translations have been updated with this release:








This version requires XWiki 13.10+.














No issue.


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). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki


Dependencies for this extension (org.xwiki.contrib.glossary:application-glossary-ui 1.4.6):


Get Connected