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

This widget could not be displayed.

You can view velocity templates of most bundled macros by going to <confluence-install>/confluence/WEB-INF/classes/com/atlassian/confluence/setup and opening atlassian-bundled-plugins.zip. 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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

223 views 3 0
Join discussion

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