Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

Table of Contents

...

maxLevel3
minLevel2
absoluteUrltrue
excludeSee also
typeflat
separatorpipe

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

unnamed first parameter

Image Removed

(tick)


This is the name given to the added metadata.

The

  • 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

Note that this
Info

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

Excerpt

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 optionImage Removedmacro browser metadata plugin optionImage Added

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 PluginImage RemovedImage Added

Insert the macro to the page.

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

Image RemovedImage Added

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

Image RemovedImage Added

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

Image Addedmacro editor preview metadata plugin macroImage Removed
Info

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 The wiki markup will create a cell of in a table containing the text value of the metadata, "Owner". 

metadata value page render unfilled table cellImage Removedmetadata value page render unfilled table cellImage Added

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 checkboxImage Removed

Note that this Image Added
Info

This only hides the metadata value on the current page. It will not affect the visibility on any pages where the metadata is reused.

When using the macro to set a metadata that is a date and time, Confluence search and CQL will return the value as a string value unless the metadata value is added in the following format yyyyMMddHHmmssSSS.

  • for example, creating a metadata End Date with a value of Dec 2023 or 08/09/2024 will be returned as a string value and is not recognized as a date format value

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.

...

Reference Markup

Code Block
languagetextthemeRDark
{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:

Code Block
theme
languagetextRDark
{metadata:Owner|hidden=true} Captain Comala {metadata}

Displaying the value as a

...

user @mentions

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

No Formatcode
||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

Child pages (Children Display)
pageComala Metadata Macros
first5

Related documentation