Confluence: Where can the Velocity Markup for Atlassian Macros be referenced?

I would like to know where I can find the Velocity markup for Atlassian macros, like the TOC Macro, so that I can create new custom versions.

Can someone point me to the section of Confluence documentation that contains these macro scripts?

This has become more important than ever now that the use of wiki markup in User Macros (custom) is no longer supported in 4.x

1 answer

You can view velocity templates of most bundled macros by going to <confluence-install>/confluence/WEB-INF/classes/com/atlassian/confluence/setup and opening Most macros are located in confluence-advanced-macros-x.x.xx.jar file. You can find the the templates there.

For TOC, the plugin is under the name toc-plugin-x.x.xx.jar file but there are no Velocity template files that are used to display the TOC.

You can also use Confluence Source Editor to see the macro's XHTML output.

Hopefully these examples are helpful:

Thank you for your answer and the supplied references. I realize now I should have mentioned that we're in the proces of upgrading our Confluence 3.4 version, so on the development server we're runnning Confluence 4.0, and I'm trying to figure out how to upgrade all the custom User Macros that often have many other macros (and other wiki markup) in them...

The simplest user macros we have I'm converting to HTML, but many user macros in page templates (not for common editors via macro editor) that incorporate functinoality from other embedded macros in the user macros, I am thinking that I will move them into widgets ( ~ portals) that are part of the Community Bubbles plugin, Using widgets and portals initiates a lot of work for the macros that are in content areas that need to be renamed as bubbles-widget - for many pages in one documentation space we have a header and footer import macro on each page, so these will likely have to become bubble-widgets

- although for other macros, I want to keep accesible for editors in macro editor - if I can reference the original velocity markup for some macros I think I could modify/remake a new custom user macro in velocity and keep the benefits for editors of using macros.

QUESTION: >> The TOC macro is one macro I need to create a new customized version adding a div wrapper to clearly attach an ID/class to it for CSS styles and javascript. HOW BEST TO DO THIS?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

807 views 3 9
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you