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

## <span style="color: #333333">Overview</span>

<span style="color: #333333">The </span>`space-metadata`<span style="color: #333333"> macro lets you attach a single piece of metadata to a space (see the  </span>[metadata](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/655988203)<span style="color: #333333">[ macro](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/655988203)</span><span style="color: #333333"> for the equivalent functionality for pages).</span>

<span style="color: #333333">The macro can be added to any page in the space for the metadata to be added to the space.</span>

## Parameters

| Parameter | Required | Default | Notes | Version |
| --- | --- | --- | --- | --- |
| `unnamed first parameter` | :check_mark: |  | This is the name given to the added metadata.<br>- The name is case sensitive<br>> ℹ️ Do not use any [reserved](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656579602) Confluence metadata names or words. |  |
| `hidden` |  | `false` | - `true` – metadata value is not displayed on the current page
- `false` – metadata value is displayed on the current page<br>> ℹ️ 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

> Macro (excerpt)
> 
> To add a single piece of metadata to a space:
> 
> - Choose the  **Space Metadata (Metadata Plugin)** macro in the Confluence macro browser
> 
> ![space metadata plugin macro browser icon](media://75b798ce-3a55-45bf-ba3a-6af5cc40d551)
> 
> Simply add your chosen metadata name to the macro editor, for example, **Department**. The metadata name is case sensitive.
> 
> ![space metadata insert macro window](media://c2db74b9-7784-4bd8-ad5d-f6df5def8ec3)
> 
> To add the value of the metadata
> 
> - **Insert** the macro to the page
> - Enter the metadata value into the metadata macro placeholder
> 
> ![image](media://c8a54234-4329-49b3-8bd2-59158b6254b9)
> 
> To see the display of the space metadata value on the current page in the macro editor:
> 
> - Choose the macro placeholder **Edit** option
> 
> ![image](media://c7ab02a4-ad7c-42f7-8de0-fa8044d3c553)
> 
> The added space metadata value is now displayed in the macro editor **Preview**.
> 
> ![image](media://1377983a-f101-4bd8-ab3a-4125565734d3)
> 
> The space 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 `||Squadron Leader Comala|` is stored for the **Department** metadata. The wiki markup creates a filled cell in a table on the published page containing the text value of the metadata, **Department**.
> 
> ![squadron leader comala metadata value displayed as filled table cell ](media://b34421f3-60b1-4115-bb1d-3498315ef249)
> 
> > 📝 When using the macro to set metadata that is a date and time, Confluence search and CQL 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` is returned as a string value and is not recognized as a date format value

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

The macros retrieving the metadata value render the markup into the page they are used on.

## Reference markup

```plaintext
{space-metadata:Department}Systems Support{space-metadata}
```

The metadata value name is added to the `space-metadata` macro. The metadata value is the content of the macro's body.

Adding the hidden parameter means the metadata value is not displayed on the page where the macro has been added. This does not affect the display of the metadata value when it is retrieved on other content.

```plaintext
{space-metadata:Department|hidden=true}Systems Support{space-metadata}
```

## Usage with the Comala Document Management app

The `space-metadata` macro is **NOT supported** by the Comala Document Management app and does not work at the workflow level.

## Related macros

- [https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656579293](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656579293)
- [https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656578849](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656578849)
- [https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/655890257](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/655890257)
- [https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/655890479](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/655890479)

## Related pages

- [Adding metadata to spaces](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/655988362)
- [Retrieving and displaying space metadata](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/655758622)
- [Using metadata in a space](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/655758361)