Please confirm whether the TOC macro can support headings from other macros that are embedded within the iframe

Hello,

I shared this question on the Atlassian community, and they advised me that it would be more appropriate to ask it here.

We are developing a macro which allow the inclusion of headings within the macro.
I would like to verify whether the table of contents (TOC) can effectively extract headings from other macros embedded within the iframe ?

Thanks,
Deepti

Hello @DeeptiLalwani

Why not just try it yourself and find out?

  1. Create your macro that includes headings.
  2. Place your macro on a page with content that also includes headings.
  3. Place the TOC macro on the same page.
  4. Observe if the TOC macro picks up the headings in your macro as well as the headings on the page.
  5. Get answer to your own question :slight_smile:

Hi @sunnyape ,

Yes I tried and it isn’t working ,That’s why I wanted to find out if it works with other macros that are embedded in an iframe.

Regards,
Deepti

I don’t know what you mean by ‘other macros’. Aren’t we just talking about YOUR macro? The one with the headings in it, as per your screen grab.

It seems to me you have your answer. Since the TOC macro can’t be inside the same iFrame that contains your macro, then it can’t read the contents of your macro, right?

You are right; since the TOC macro documentation does not explicitly state that headings within the macro are not supported , I wanted to confirm just to be sure.

1 Like

Also, even if it were possible, the TOC macro would have no idea where in the tree order to put the headings from your macro.

  1. The base page has headings in a hierarchy sequence, and it’s that sequence that the TOC macro is parsing.
  2. The headings in your macro are completely separate and have their own, separate hierarchy sequence.

The TOC would need some sort of ‘intelligence’ to know how to merge together multiple random headings sequences with random words in their titles into some semblance of a correct order.

1 Like