Overview

The basic {metadata} macro allows the attachment of a single piece of metadata to a page.

This allows a single metadata value stored on an individual page to be referenced from other pages (see the space-metadata macro for the equivalent functionality for spaces).

Parameters

ParameterRequiredDefaultNotesVersion
unnamed first parameter


This is the name given to the added metadata. The name is case sensitive.
hidden
false
  • true – metadata value is not displayed on current page
  • false – metadata value is displayed on current page

Note that this option to hide or display the metadata value affects only the page that contains the {metadata} macro. It does not affect any pages where the metadata is reused.


Usage

To add a single piece of metadata to a page, choose the Metadata (Metadata Plugin) macro in the Confluence macro browser:

macro browser metadata plugin option

Simply add your chosen metadata name to the macro editor e.g. Owner. This metadata name will be case sensitive.

macro editor dialogue box for Metadata Plugin

Insert the macro to the page.

Add the value of the metadata to the metadata macro placeholder.

To see the page display, choose the placeholder Edit option.

The added metadata value is now displayed in the macro editor Preview.

macro editor preview metadata plugin macro

The metadata macro body accepts both plain text and simple wiki markup for the value.

The metadata is stored as un-rendered wiki markup, so in this case the value "|Captain Comala|" is stored for the "Owner" metadata. The wiki markup will create a cell of a table containing the text value of the metadata, "Owner". 

metadata value page render unfilled table cell

If you don't want the metadata value displayed on this page, simply check the Hidden option in the macro editor. 

macro editor metadata plugin hidden checkbox

Note that this will not affect any pages where the metadata is reused.


You can add the individual metadata from this page onto another page, for example, using the metadata-from macro or one of the report macros.

The reporting macros then render the markup into the page they are used on.

Reference Markup

{metadata:Owner}|Captain Comala|{metadata}

Display simply as:

metadata value page render unfilled table cell

In the example, as the macro allows use of simple wiki markup, the value is displayed in a single cell of a table on the current page.

This would also attach "Owner" as a piece of metadata to the page.

If you don't want the metadata to be displayed on the current page you can use the "hidden" parameter:

{metadata:Owner|hidden=true} Captain Comala {metadata}

Usage with the Comala Document Management app

The {metadata} macro is supported by the Comala Document Management app.

Related macros

Related documentation