Glossary Application
![]() | Glossary feature for XWiki |
Type | XAR |
Category | Application |
Developed by | Sarthak Gupta, Vincent Massol, slauriere, Clément Aubin |
Active Installs | 20 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
The Glossary application has the following features:
- Add a new Glossary entry (Currently supports only single word entries
, 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.
- Glossary 1.1+ Glossary Reference Macro (glossaryReference) to link to a glossary entry
- Glossary 1.1+ Automatically modify page content to add Glossary Reference Macros on save
- Glossary 1.3+ Glossary Entries Macro (glossaryEntries) display every entry of a glossary in a document
Glossary 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:
Usage
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
Glossary 1.4+
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:
- When using the Transformation method, only the default Glossary is used to recognize glossary entries. Note that using the "Update on save" method is working fine with multiple glossaries.
- No UI to create new Glossaries.
Update documents to add glossary entries automatically
Glossary 1.1+
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".
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:
The glossaryId parameter is optional, defaulting to "Glossary", while the entryId one is mandatory.
Glossary Entries Macro
Glossary 1.3+
The glossary entries macro will display every entry of a glossary as a list, ready to be embedded inside of a wiki document.
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.
Configuration
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
- To activate it, edit WEB-INF/xwiki.properties, look for a property named rendering.transformations and make sure it's uncommented and contains the value glossary.
For example:
rendering.transformations = macro, icon, glossaryMake 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
1.5.2
1.5.1
1.5.0
See 1.5.1.
1.4.7
The following translations have been updated with this release:
1.4.6
1.4.5
1.4.4
The following translations have been updated with this release:
1.4.3
1.4.2
1.4.1
1.4
1.3
1.2.1
1.2
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1
1.0.4
1.0.3
1.0.2
1.0.1
1.0
0.3
0.2
No issue.
0.1
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:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- You'll also need to install all dependent Extensions that are not already installed in your wiki
Dependencies
Dependencies for this extension (org.xwiki.contrib.glossary:application-glossary-ui 1.5.2):
- org.xwiki.contrib.glossary:application-glossary-api 1.5.2
- org.xwiki.platform:xwiki-platform-rendering-macro-velocity 13.10
- org.xwiki.platform:xwiki-platform-rendering-macro-include 13.10
- org.xwiki.rendering:xwiki-rendering-macro-box 13.10
- org.xwiki.rendering:xwiki-rendering-macro-message 13.10
- org.xwiki.rendering:xwiki-rendering-macro-html 13.10
- org.xwiki.platform:xwiki-platform-localization-source-wiki 13.10
- org.xwiki.platform:xwiki-platform-rendering-wikimacro-store 13.10
- org.xwiki.platform:xwiki-platform-livetable-ui 13.10
- org.xwiki.platform:xwiki-platform-search-ui 13.10
- org.xwiki.platform:xwiki-platform-panels-ui 13.10
- org.xwiki.contrib:application-migrator-migrators-class-default 1.1.3
- org.xwiki.platform:xwiki-platform-appwithinminutes-ui 13.10