This site has moved to the integrated Appfire documentation and information site for our apps.
From February 2024 this site is no longer updated.
Take a look here! If you have any questions please email support@appfire.com
set-metadata macro
Overview
The set-metadata macro is used to define metadata key=value
pairs which are stored at the content-level (page or blog post).
The values can later be retrieved via the get-metadata macro, or any other plugin capable of reading metadata. In addition, the values can be used as Value References in any macro or feature which supports them.
Where to use it?
Optional.
One or more set-metadata macros can be put in a trigger macro.
Parameters
Parameters | Required | Default | Notes |
---|---|---|---|
first unnamed | The metadata key (name by which the value can be accessed).
| ||
macro body | The metadata value
| ||
|
| Should the macro body contents be trimmed (remove whitespace)?
| |
| current page | Where should the metadata be stored (default = current page)?
Note: This parameter only works on pages, not blog posts. |
Basic example
{workflow:name=Store metadata} {state:Test} {state} {trigger:pagecreated} {set-metadata:Document Author} @user@ {set-metadata} {trigger} {workflow}
Note: This example requires space mode for the pagecreated
event to work.
...retrieving later
You can either use the get-metadata macro, or a macro that supports such content.
0
... using Confluence Search
Metadata values created with the set-metadata macro are only indexed by Confluence and appear in the Confluence search if the Comala Metadata app is installed.
All examples
-
Blog Post Events — Workflow events associated with blog posts
-
Dynamic page header using a metadata value and triggers — Use a trigger to display a different page header for each state in the workflow. Page header content is set as a metadata value.
-
Use metadata to increment composite major, minor, patch content version on an approval decision requiring a parameter — Use the
{increment-metadata}
macro to increment major.minor.patch metadata value for a single approval using three triggers. -
Using set-message and metadata to display different information for the draft and published content — Using the
view
parameter of the{set-message}
macro to display a different metadata when users view the draft or published versions