Expandable Macro

Last modified by Ralf on 2026/06/02 14:22

cogA macro similar to an HTML <details> element, that shows a short summary of a certain content while providing more details on mouse click
TypeXAR
CategoryMacro
Developed by

Ohrner IT GmbH

Rating
0 Votes
LicenseGNU General Public License 3

Success

Installable with the Extension Manager

Description

Similar to an HTML <details> element, this macro enables information to be displayed in short form first, while showing the full details on mouse click. If multiple of these Expandable macros are arranged directly on top of each other, they form an accordion component.

Preview

Preview

Features

  • Allows to expand/collapse details
  • Expandable elements can be expanded or collapsed by default
  • Stacked Expandable elements form an accordion
  • Accordions can be non-exclusive (means, each accordion item can be expanded/collapsed individually) or exclusive (means, only one accordion item of an exclusive accordion can be expanded at the same time)

Dependencies

  • org.xwiki.platform:xwiki-platform-rendering-wikimacro-api
  • org.xwiki.platform:xwiki-platform-skin-skinx
  • org.xwiki.platform:xwiki-platform-rendering-macro-velocity
  • org.xwiki.rendering:xwiki-rendering-macro-html

License

GNU General Public License v3.0

© 2025 Ohrner IT GmbH

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

Release Notes

v1.2.0

  • All Expandables will be expanded automatically on export
  • Minor changes to the naming of CSS classes 
  • Added shell scripts to improve development process

v1.0.3

  • First published release

Get Connected