---
title: "metadata macro"
canonical: "https://support.appfire.com/space/COMALACM/655988203/metadata%20macro"
format: markdown
---
> Macro (aura-html)

## Overview

The basic `metadata`** **macro allows the attachment of a single piece of metadata to a page.

This <span style="color: #333333">allows a single metadata value stored on an individual page to be referenced from other pages (see the </span>[space-metadata](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656578849)<span style="color: #333333">[ macro](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656578849)</span><span style="color: #333333"> for the equivalent functionality for spaces).</span>

## Parameters

| Parameter | Required | Default | Notes | Version |
| --- | --- | --- | --- | --- |
| `unnamed first parameter` | :check_mark: |  | This is the name given to the added metadata.<br>- 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<br>> ℹ️ 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

> Macro (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 option](media://dd911145-8244-45d6-938e-bf5c3a12f140)
> 
> Simply add your chosen metadata name to the macro editor e.g. **Owner**. This metadata name will be case sensitive.
> 
> ![image](media://1ecd88bf-4b5c-470d-9376-45215be9d63b)
> 
> Insert the macro to the page.
> 
> Add the value of the metadata to the `metadata` macro placeholder.
> 
> ![image](media://1b91c9f6-f72a-4c06-8678-1cdaa7545ca8)
> 
> To see the page display, choose the placeholder **Edit** option.
> 
> ![image](media://e8d3523b-3d96-473f-897f-d829c05228d1)
> 
> The added metadata value is now displayed in the macro editor **Preview**.
> 
> ![image](media://98b2aa84-d201-4be7-b11f-9af2d450299b)
> 
> > ℹ️ 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`.
> 
> ![metadata value page render unfilled table cell](media://3b404475-c57f-4216-ac3d-839262dfd3f7)
> 
> If you don't want the metadata value displayed on this page, simply check the **Hidden** option in the macro editor. 
> 
> ![image](media://eb7d17a5-74dc-4c0f-98d3-8a08f2e0e5dd)
> 
> > ℹ️ 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 ](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656578971)<span style="color: #000000">[macro](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656578971)</span> or one of the report macros.

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

## Reference Markup

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

Display simply as:

![metadata value page render unfilled table cell](media://3b404475-c57f-4216-ac3d-839262dfd3f7)

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:

```plaintext
{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

![image](media://82a2a31d-5c9a-455b-9558-aeea5b226e64)

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

![image](media://e83d254c-0cc7-4bbf-9190-36b48bab3814)

## Usage with the Comala Document Management app

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

## Related macros

> Macro (children)

## Related pages

- [Adding metadata to a page](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656676899)
- [Retrieving and displaying page metadata](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656677227)
- [Using metadata on a page](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/655988030)