Documentation for Confluence 5.4.
Documentation for Confluence OnDemand and earlier versions of Confluence is available too.

Skip to end of metadata
Go to start of metadata

Using a macro, you can add extra functionality or include dynamic content on a page. For example, the Attachments macro will list a page's attachments in the page itself, so that readers do not have to visit the Attachments tab.

Adding a Macro to your Page

Including Macros with the Macro Browser

To add a macro to a page:

  1. In the Confluence editor, choose Insert > Other Macros.
  2. Find and select the required macro.

Speeding up macro entry with autocomplete: Type { and the beginning of the macro name, to see a list of suggested macros. Details are in Using Autocomplete.

To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.

Macro Parameters

Many macros allow you to include optional parameters 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, where you can edit the macro's parameters.
  • Select a macro placeholder to cut, copy and paste the macro.

On this page:

Macros Shipped with your Confluence Installation

When you download your Confluence installation file, many macros are shipped with the download. Below is a list of the macros currently shipped with Confluence. Click a macro name for details of the usage, including optional parameters and examples.

Information about Other Macros

Other macros are available as plugins or as user macros, and can be installed by your Confluence administrator. For example, macros that may be of interest are available from AdaptavistCustomWare and the Confluence SharePoint Connector

Writing your own Macros

To learn how to write your own macro, take a look at the following documentation:

  • User macros are simple template-like macros that allow you to create simple formatting macros using the Confluence web interface. Read more about Writing User Macros
  • The Confluence Plugin Guide tells you how to develop a plugin for Confluence.
Page: Activity Stream Macro Page: Anchor Macro Page: Attachments Macro Page: Blog Posts Macro Page: Change-History Macro Page: Chart Macro Page: Cheese Macro Page: Children Display Macro Page: Code Block Macro Page: Column Macro Page: Content by Label Macro Page: Content by User Macro Page: Content Report Table Macro Page: Contributors Macro Page: Contributors Summary Macro Page: Create from Template Macro Page: Create Space Button Macro Page: Excerpt Include Macro Page: Excerpt Macro Page: Expand Macro Page: Favourite Pages Macro Page: Gadget Macro Page: Gallery Macro Page: Global Reports Macro Page: HTML Include Macro Page: HTML Macro Page: IM Presence Macro Page: Include Page Macro Page: Info Macro Page: JIRA Chart Macro Page: JIRA Issues Macro Page: JUnit Report Macro Page: Labels List Macro Page: Livesearch Macro Page: Loremipsum Macro Page: Multimedia Macro Page: Navigation Map Macro Page: Network Macro Page: Noformat Macro Page: Note Macro Page: Office Excel Macro Page: Office PowerPoint Macro Page: Office Word Macro Page: Page Index Macro Page: Page Properties Macro Page: Page Properties Report Macro Page: Page Tree Macro Page: Page Tree Search Macro Page: Panel Macro Page: PDF Macro Page: Popular Labels Macro Page: Profile Picture Macro Page: Recently Updated Dashboard Macro Page: Recently Updated Macro Page: Recently Used Labels Macro Page: Related Labels Macro Page: RSS Feed Macro Page: Search Results Macro Page: Section Macro Page: Space Attachments Macro Page: Space Details Macro Page: Space Jump Macro Page: Spaces List Macro Page: Status Macro Page: Table of Contents Macro Page: Table of Content Zone Macro Page: Tasklist Macro Page: Tip Macro Page: User List Macro Page: User Profile Macro Page: User Status List Macro Page: View File Macro Page: Warning Macro Page: Widget Connector Macro

36 Comments

  1. Is there a macro to increase the font size? I know there is one to decrease the size {smalltext}, but I am getting several requests in make the fonts larger.

    1. There's no built-in macro to do this, but you could easily do it with a User Macro. Create a macro called 'big', which converts its body to HTML and outputs HTML, with the following contents:

      You can then use {big}Important{big} to create big text. Nesting macros isn't currently supported, so to make it extra-big, you'd need to add more macros, or make the font-size a parameter:

      You could use this macro like this: {big:250%}Really important!{big}.

      We also have an outstanding feature request to add font-size to the wiki markup which you can vote for: CONF-5309.

  2. Is there a macro that allows you to collapse a table?

    1. Anonymous

      I use the [expand|http://confluence.atlassian.com/display/CONFEXT/Expand+Text+User+Macro] macro a lot to hide all sorts of stuff, tables included, if thats your intention.

  3. Notation Guide in Confluence makes mention of {table-data] macro but nothing to be found here or in Working with Tables.

    Trying to find out if it possible to call tables created using

    Unknown macro: {table-data}

    macro onto other pages within same space? At same time I am keen to display only certain columns of the table data and not allow editing.

    1. Hi Tom,

      The {table-data} macro is provided by the third-party Scaffolding Plugin. You can learn more about the plugin and the macro from these pages:

      Hope that helps,
      Azwandi

  4. Anonymous

    I need to use strings like

    Unknown macro: {somethinginhere}

    in my wiki page. I keep getting the error 'Unknown Macro'. How to let wiki ignore these curly braces?. Any help is appreciated.

    Thanks

    Abdul

    1. You can add a backslash before the curly braces.

      {somethinginhere}

      Regards

      1. Anonymous

        Great - just the answer I was looking for. Thanks

      2. Anonymous

        I have 200 places in my text with {}.  Is there some way I can tell confluence to ignore them all without having to put a '\' in front of each one?

  5. Anonymous

    Thanks to tell me in which language are the macros written or where I can find a user manual of this language (instructions beginning with #)

    1. Hi

      Thanks to tell me in which language are the macros written or where I can find a user manual of this language (instructions beginning with #)

      I believe the language is called Velocity. To learn more on Velocity language please refer to this documentation:

      Hope that helps.
      Best rgds,
      Zed

  6. Anonymous

    Is there a "hit counter" macro available?  We'd like to see how many people are viewing our wiki pages.

    1. Hi

      I think you can try the Confluence Usage Stats. To learned more on this plugin please refer to the following link:

      Also, the Confluence Usage Stats is ship together with the latest Confluence version. You might need to enable it via Confluence admin >> Plugins

      Hope that helps.
      Best rgds,
      Zed

  7. Anonymous

    Hi,

    I need a macro to show content from an other page for a certain time or a certain calendar date. I know the macro The page Home could not be found. and I need that with a time or date limiting. If the time is over or the date is reached, the content have to be hidden.

    Thanks for your help.

    Cheers

    Ulrike Trippel

    T-Systems Germany

  8. Anonymous

    Hi,

    I need a macro to show content from an other page for a certain time or a certain calendar date. I know the macro "excerpt-include:Home|nopanel=true" and I need that with a time or date limiting. If the time is over or the date is reached, the content have to be hidden.

    Thanks for your help.

    Cheers

    Ulrike Trippel

    T-Systems Germany

  9. Hi,

    Can you document how to localize a macro providing an English, French, German... description (and potentially the same for the arguments...) or a good example with all the source code for one?

    So far our macros are described in the atlassian-plugin.xml used for our theme like below. Can we keep this way to do it or do we need to do it differently, implement an interface in the macro or any other solution? I have trie to add a section <description lang="fr"> or <description lang="fr_FR"> with no success
    <macro name="english" key="english" >
            <description>
                This very simple macro displays its content if the current language is English (or is not French).
                The french macro does the opposite.
            </description>
        </macro>
      Thanks

  10. Anonymous

    Is there a way to populate the list of people who have RSVP'd into a table. The idea is we want to use RSVP t so people who want to request an item can just submit there name using the RSVP macro but we want this data to be automaticaly placed into a table so we can track it as well. Also is there a way to have the total amount of items be listed and it automaticaly decrease as people RSVP? I know I could just use MS access to build sometihng like this but we want the community to be able to do this. 

  11. Is it possible to restrict a Macro of a plugin from the users with out listing it in the macro browsers? this is very much like the restrict option which is available in hiding the user-macros to the users.

  12. Hello. How do you add a macro similar to the one on the top of this page that links to previous version of Confluence? The requirement would be similar to what's displayed on this page: 1. Has to be placed above the page title and 2. appear on all subpages within the space. I am new to macros so a detailed instructions would be most appreciated. Thank you!

    1. Hallo jason

      We're using the Documentation theme in this space. The theme allows you to add content to the page header and footer, and the left-hand navigation bar too.

      The header, footer and navigation bar accept wiki markup. To get the specific header that's at the top of this page, we have the following markup:

      There's more about the Documentation theme here: Configuring the Documentation Theme.

      Cheers, Sarah

  13. Anonymous

    Please can we have the 3.5 User's Guide back? It contained so much more useful information. For example:

    • This page (Working with Macros) was in a sensible place. Now I find it under "Customising Confluence"??
    • The Index was not just a bunch of labels. Who knows what labels you've used?
    • Macro parameters were given in detail, with examples of syntax.

    Your tech writers are trying to be too clever by half. I speak as a tech writer...

    1. Hallo anonymous

      I'm sorry that you've been having trouble finding the information that you need. I agree with you that this page (Working with Macros) was in an odd place. I've moved it under the section called "Creating Content". The technical writers spent a fair bit of time rearranging the table of contents in time for the Confluence 4.1 release, in the hope that it would be simpler to follow. So feedback like this is useful.

      I think the index in the 3.5 guide was the same. It's possible the Confluence user interface that is making it look different, and more like a bunch of labels. In previous versions, the labels were displayed as simple links, whereas now each label is a big block. But the functionality of the index is unchanged. The Confluence 3.5 User's Guide is still around: Working with macros. However, it's hosted on this wiki, which is of course using the latest version of Confluence.

      I think that the reason for removing the details of the macro syntax was that Confluence no longer uses wiki markup as its primary entry format, although you can still insert it on initial input. The macro browser UI gives the details of the parameters. I do agree, though, that in some cases the simplification went too far, especially given the fact that wiki markup is still a valid way of entering content. I hope to fix this, as soon as time allows. At the moment, my focus is on documenting the upcoming release. (smile)

      Cheers, Sarah

      1. Task logged: CONF-24972 - Document the markup for macro names and parameters - both wiki markup and the new storage format Resolved

      2. Hi Sarah

        Now that I've found my login ID and password I can identify myself! Thanks for your prompt reply, and your openness to change things. Your flexibility is appreciated!

  14. Is there any way as the administrator of the wiki to customize the default widgets at the bottom of the Insert menu? Our employees don't find many of these options useful, whereas we heavily rely on Sections and Columns and a number of other widgets that are harder to find.

  15. Anonymous

     

    Hi, can somebody help me? (smile) i need insert macro like page tree, but not only title of page... i need in one row display another informations from DIV boxes... any idea? Thanks

  16. Anonymous

    I don't seem to have the View File macro available to me. I'm an administrator, how do I enable it? Thanks!

  17. Anonymous

    Hello,

    Please help me to use forum macro in my page to make a forum for my group.

    Regards,

    Astha7

  18. Anonymous

    Is there any way to add macros to the header and footer of a page? Someway to place it into the pdf export stylesheet so I can have dynamic content?

  19. Anonymous

    excuse me, i cant figure how the hack to edit an existing a macro. most unintuitive ui

  20. Hello,

    The "Documentation Link macro" was documented in Documentation Link Macro (3.5) using http protocol.

    In the latest documentation this macro is not found. Is this macro depreciated?

    Will this macro support https in the near future?

  21. Is there any way we can edit the JIRA ISSUE macro to add more columns .

    Currently there is no way to display the estimates from JIRA , its coming as Blank Column .

    Can we edit the JIRA ISSUE macro code .

    If yes can any body point me  to the right direction .

    Regards
    Abyakta

  22. Any macro to count words on a page?  Our translation team uses this information to get pricing from vendors.