metadata macro

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

Parameter

Required

Default

Notes

Version

Parameter

Required

Default

Notes

Version

unnamed first parameter



This is the name given to the added metadata.

  • the metadata name is case sensitive



hidden



false

  • true – metadata value is not displayed on current page

  • false – metadata value is displayed on current page

The 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.

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.

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 in a table containing the text value of the metadata, Owner.

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

This only hides the metadata value on the current page. It will not affect the visibility on 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:

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}

Displaying the value as a user @mentions

If you want to display the user @username format for the user, you can use the following syntax.

||Owner | [~username]|


Simply add to the body of the macro on the draft page

This will display the following on the published page showing the @username

Usage with the Comala Document Management app

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

Related macros

Related documentation