It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to render a Macro with body in page content layout?

I am developing a Macro module, and want to apply this macro for all pages of a space by add this macro to page layout (Space tool -> Look and feel). My macro needs a body like Table of Content Zone. 

I tried to add macro to this part in the layout:



<div id="main-content" class="wiki-content">


My macro works when I use a macro without body like toc. I already make my macro as xhtml maro and wiki macro. But my Macro has to have the html of page content as input.

<div id="main-content" class="wiki-content">





But it doesn't work for a macro with body for my macro and also Table of Content Zone:

<div id="main-content" class="wiki-content">


And I get empty string for the parameter body in this method of my macro:

String execute(Map parameters, String body, RenderContext renderContext)


Any one can help me? 


0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

How is your team having fun and bonding, remotely, utilizing Confluence?

Thanks everyone for answering last week’s question. The winner of the random drawing from those who commented is: @LarryBrock I’ll contact you separately with your prize details. This wee...

294 views 9 7
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you