• Documentation

Insert the excerpt macro

The excerpt macro is used to mark a part of a page'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 and distinguish them from one another with a name you assign them. This allows you to create a page full of blocks of content to reuse on other pages. 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 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 this page.

  4. Select the Hide Excerpted Content check box if you want the content inside the macro to be hidden when this page is published.

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

You can also type / into the page 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 the page, 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 and use a specific one on another page using the Excerpt Include macro.

Hide Excerpted Content
(hidden

false

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

This option affects only the page that contains the Excerpt macro. It does not affect any pages 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 that contains the Excerpt macro. It does not affect any pages where the content is reused.

 

Still need help?

The Atlassian Community is here for you.