12 Days of Confluence Elements: Day 9 - What are macros?

12 Days of Confluence Elements: Day 9 - What are macros?

What are macros?

A macro is a type of element that allows you to extend the capabilities of your Confluence pages, allowing you to add extra functionality or include dynamic content. For example, use the Attachments macro to list files attached to a page. Macros can also be used to create visual interest.

Add a macro to your page

 

To add a macro:

  1. When editing, select the Insert icon.

  2. Find the macro by name and select it

  3. Configure it as needed

You can also type / on the page to bring up the same list you'd see by selecting the Insert icon from the toolbar. Continue typing the name of the macro to filter the list.

To edit a macro:

  1. Select the macro placeholder.

  2. Select the Edit icon to open the configuration panel.

  3. Configure the parameters. Your changes are saved as you go.

  4. Resume editing the page, and the panel closes.

You can also select the centered , medium-width , and full-width icons to adjust the width of some macros. Select the trashcan icon to remove the macro.

Macro parameters

Many macros have optional parameters you can use to control the macro's output.

With the Attachments Macro, for instance, you have two optional parameters allowing you to:

  • Specify the file formats of the attachments displayed

  • Choose whether or not you want old versions of the attachments displayed

Macro placeholders

Macro placeholders are displayed in the editor where you have added a macro to the page.

When editing a page, you can:

  • Double-click a macro placeholder (or click the placeholder and choose Edit) to open the macro dialog window and edit the macro's parameters

  • Select a macro placeholder to cut, copy and paste the macro

Looking for labels? They can now be found in the details panel on the floating action bar.