How to wrap Confluence table with {expand} macro

John Treankler March 21, 2018

I have some tables with hundreds of rows, which requires a lot of scrolling to see the content below them, so I'd like to make the tables expandable. I've studied this page, searched for similar questions, and mocked up several tests, but so far: no joy.

I am able to construct an expandable table that functions properly in preview mode:Expandable Table in Preview.png

but after I click the Save button the table is no longer expandable:

After Clicking Save button.png

As you can see in the image just above, the text Click here to expand... is not a clickable link, nor is the right-arrow. And clearly the table is already expanded, not hidden, like it is at the top of the first image.

It doesn't matter if I use the macro browser to insert the expand, or if I type up the markup by hand; either way I get an expandable table that works in Preview mode but fails after it's saved.

Given that the expandable table functions perfectly in Preview mode, it appears that the failure after the Save button is pressed is a bug. Hopefully this is an easy one to fix?

 

1 answer

1 accepted

0 votes
Answer accepted
Andrey Khaneev _StiltSoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 21, 2018

Hello John,

I tried to reproduce your issue, but Expand macro works with table inside both on page and inside a comment. I used Confluence 6.7.1. What is your Confluence version?

And here is an alternative solution you may find useful: use Table Filter macro to freeze the first row. See how it works here.

John Treankler March 21, 2018

Thank you for that very rapid response, Andrey. I'm new to Confluence, so this might not be the answer you're looking for, but I clicked the question-mark-in-a-disc icon, then clicked About Confluence and see a pop-up that includes

 

License Information for Confluence Cloud

Confluence 1000.0.0

 

I don't think that 1000.0.0 is the version number you're looking for. If there's a different version number somewhere in Confluence then you might have to instruct me how to provide it for you.

FWIW, purchasing Table Filter is probably not an option.

Andrey Khaneev _StiltSoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 21, 2018

You are using Confluence Cloud, that means it is always the latest but the same as the latest Confluence Server version.

I tried it on Cloud version and reproduced the issue when Expand macro is in a comment. But after I added Expand macro to the page with that comment, it fixed the issue. 

So the workaround is to add an empty expand macro to the page to be able to use it in comments.

Also you can report this issue to Atlassian support team.

John Treankler March 21, 2018

Thanks, again. I'm going to look into this:

the workaround is to add an empty expand macro to the page to be able to use it in comments.

I did some more testing and have the same problem with an image wrapped in `{expand}` macro in a comment.

John Treankler March 21, 2018

@Andrey Khaneev _StiltSoft_ that work-around is working for me, thank you! 

Like Valentina_Lemiakina likes this
Andrey Khaneev _StiltSoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 21, 2018

Glad to help you, John!

Like Valentina_Lemiakina likes this
Doug Haller December 11, 2019

My experience is that I can no longer create an expand macro within a table. The macro gets added to the bottom of the page, below and outside of the table. This issue/change arose with updates to Confluence in the last couple of months.

Anshul Mathur January 11, 2022

Hi, I am as well having issues with the Expand Macro with it adding just after the Table.

Please can anyone help me to resolve the issue? I am using the latest Cloud version of Confluence.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events