• Products
  • Documentation
  • Resources

Insert the excerpt macro

 

The Excerpt macro is used to mark a part of a page's content for re-use. Defining an excerpt enables other macros, such as the Excerpt Include and Blog Posts 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.

Use 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 Excerpt Include macro. 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 or wikimarkup 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.

Note that this option affects only the page that contains the Excerpt macro. It does not affect any pages where the content is reused.

Wiki markup example

Wiki markup is only supported in the legacy editor.

Wiki markup is useful when you need to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.

Macro name: excerpt

Macro body: Accepts rich text.

1 2 3 4 5 6 {excerpt:hidden=true|atlassian-macro-output-type=BLOCK} This is the *text* I want to reuse in other pages. This text is inside an Excerpt macro. {excerpt}

The following additional parameter is available in storage format and wiki markup. 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.

Note that this option affects only the page that contains the Excerpt macro. It does not affect any pages where the content is reused.

Last modified on Nov 10, 2021
Cached at 3:45 PM on Dec 5, 2021 |

Additional Help