Expando Macro for Confluence: Collapse and Expand Headings

A photo of the blog post's author
CEO
2 min read /

We have just released the public beta of a new add-on from the "little, useful and free helpers" category: The Expando Macro.

The Expando Macro makes headings clickable and expands or collapses the content that belongs to that heading, and it expands content based on a macro parameter or on the linked HTML anchor.

Another Expand Macro?

Our tech writers want to make use of Progressive Disclosure in our docs to help readers focus on the relevant content. They weren't 100% happy with the standard Expand Macro that is shipped with Confluence, because they want to use headings to structure Confluence pages and collapse content without adding additional structural elements. Also, for FAQs and Glossaries they need to link and expand single entries (using HTML anchors).


An Example Glossary

The following page is an example from a glossary for a product:

As you can see the content is all displayed and even though there are only 4 entries there is a lot of potentially distracting content.

Let's add the Expando Macro.

Add an Expando Macro to all headings that should operate as expandable/collapsible content sections. As a result of this, the sections below all headings are collapsed, or only selected sections are expanded:

This is the above screenshot, the content below the third heading is expanded because it's anchor is referenced in the URL.

Get Started

The macro has been uploaded to the Atlassian Marketplace and can be simply installed via the UPM.

Please give it a try and let us know what you think!

Go ahead and try the Expando Macro. It's free and available on the Atlassian Marketplace.
Let us know what you think of the macro and how you structure your content on a page level by commenting on this post!