I am using the expand macro to collapse a table of contents (list of sections within the document) for a document in Confluence. I followed the steps below.
The expand/collapse works fine but doesn't work if I put the expand function in a cell of a table with other document information (owner, stakeholders, dates, etc.). When used in a table the expand doesn't control the /toc like it does when used outside of a table.
Hi @Bob
As @Kristian Klima shared, it's possible to use the expand macro within the table cell. However, you can not add a ToC macro inside this expand.
You are able to add a ToC within a expand macro only when the expand macro is on the page:
Hi @Bob and welcome to the community.
Can you provide a screenshot (with sensitive info blurred)?
I'm having a hard time visualizing this.
I was able to do the following
...and it works as expected (the macro expands).
The standard TOC macro always contains the headings on the entire page, no matter where you put it. (I vaguely remember a TOC Zone or smth like that macro but I never used it).
Another important thing - not all macros can be nested (one inside another), you'll notice this when a such an attempt results in the nested macro just jumping out :)
So that was the Confluence Can / Cannot do.
Now, as a content person... I advise against nesting information elements (macros). I would never use expand macro in a table. Why? Because table shows lists and relationships among the elements and, given the size of a Confluence page, it works best in a 'I look and I see' size. But even if the page real estate wasn't an issue, the moment you expand one cell - you a) suddenly add more content for the reader to process IN relation to other elements while, at the same time, challenging them to spot where everything has moved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the follow up. I inserted a screen shot for your reference. Option 1 has the TOC in the table without using expand which will result in long list of links. Option 2 is the TOC macro inside the expand macro but outside the table. This is not a bad option. I was trying to see if the TOC macro could be inside the expand macro in the table. Mariana confirm this is not possible, which is what I was experiencing. I wanted to make sure I wasn't just making a mistake.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.