Confluence is getting a fresh new look and navigation

We’re in the process of rolling out these changes and the documentation may not match your experience. Bear with us while we update it to reflect the new changes. More about navigating the new Confluence

Insert the excerpt macro

The excerpt macro is used to mark a part of a page or live doc's content for reuse. Defining an excerpt enables other macros, such as the insert excerptand Insert the blog posts macro macros, to display the marked content elsewhere.

You can add multiple excerpts per page or doc and distinguish them from one another with a name you assign them. This allows you to create a page or doc full of blocks of content to reuse on other pages or docs. The content you add to the excerpt becomes the single source, which allows you to make a change in that one place, and all the pages that use the excerpt include macro to show that content will reflect the changes you made in the excerpt macro.

To add the excerpt macro:

  1. In the Confluence editor, select View more

  2. Find the excerpt macro and select it. The macro placeholder is added and the right panel opens.

  3. Enter a name for the macro so that you can reference it on another page or live doc using the insert excerptmacro.
    If you don't give the macro a name, you will only be able to include the content from the first excerpt macro on a page or doc.

  4. Select the Hide excerpt on this page check box if you want the content inside the macro to be hidden.

  5. Add your content inside the excerpt macro placeholder in the page or doc. Most of the formatting options can be used, and elements in the toolbar can be inserted into the macro.

You can also type / to bring up the same list you'd see by selecting from the toolbar.

To edit the excerpt macro:

  1. Select the macro placeholder. The floating toolbar appears.

  2. Select Edit. The right panel opens.

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

  4. Resume editing, and the panel closes.

Parameters

Parameters are options that you can set to control the content or format of the macro output. Where the parameter name used in Confluence storage format is different to the label used in the browser, it will be listed below in brackets (example).

Parameter

Default

Description

Excerpt name

null

Allows you to identify this macro so that you can add multiple Excerpt macros to one page or live doc and use a specific one on another page or doc using the Excerpt Include macro.

Hide excerpt on this page
(hidden

false

Controls whether the content contained in the Excerpt macro placeholder is displayed on the page or live doc.

This option affects only the page or doc that contains the Excerpt macro. It does not affect any pages or docs where the content is reused.

The following additional parameter is available in storage format. It performs the same function as the options panel in the editor. 

Parameter name

Required

Default

Parameter description and accepted values

atlassian-macro-output-type

No

BLOCK

Determines whether the content of the Excerpt macro body is displayed on a new line or inline.

Available values:

  • BLOCK – Displays the content of the macro on a new line.

  • INLINE – Displays the the content of the macro as part of the same paragraph as the text preceding and following it.

This option affects only the page or doc that contains the Excerpt macro. It does not affect any pages or docs where the content is reused.

 

Still need help?

The Atlassian Community is here for you.