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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Overview

Retrieving and displaying metadata values from a single page using the metadata-from macro and metadata-values macro

Retrieving and displaying a single piece of metadata from a page

To retrieve a single metadata value from a page, choose the Metadata from  macro from the Confluence macro browser:

The macro editor allows you to configure the macro.

metadata-from macro editor dialogue box options

The macro requires you to add both:

  • the metadata value name

  • the source page for the metadata name. If the metadata being retrieved is from the current page you need to add @self to Insert the macro.

The macro will retrieve the metadata value and display on the current page.

If the metadata includes any wiki formatting as part of the value then this will be rendered on the current page together with the value.

In the example the value of the metadata Division has been defined using the Comala Metadata metadata macro.

On the page, the metadata value is retrieved using the metadata-from macro.

In this example, the display would simply be the value of the metadata Division filtered to be from the page Project initiation Document.

Retrieving and displaying multiple pieces of metadata from a page

To retrieve multiple metadata values from a page or pages, choose the Metadata report macro from the Confluence macro browser:

The macro editor allows you to configure the macro before you Insert the macro to the page:

metadata report macro browser editor showing fields, space key and link options

The macro requires you to enter at least one metadata value name into Fields. Multiple metadata values can be retrieved by adding a comma separated list of metadata value names.

Adding the metadata value names and choosing to Insert the macro adds the macro placeholder to the page being edited.

This displays a table on the page of the metadata value names and their values from the child pages of the current page.

For example, the macro placeholder above would display the values for three pieces of metadata for each of the child pages:

The retrieved metadata values for the metadata are displayed in a separate row for each child page.

If the metadata value names are not found, or there is no value has added, the table will display the metadata value names specified in the macro but with no value(s) added. The columns are in order of listing of the metadata value names in the macro editor.

Additional options in the macro editor allow you to customise the macro.

Customizing the metadata-report macro to select pages for the report

The choice of source pages for the metadata report can be customized as follows:

  • Space key determines the space or spaces for the page metadata to be listed

  • Content type - pages or blog posts

  • Root defaults to the current page and will report the metadata values on the child pages of the current page 

You can choose the root to be parent page of the current page using @parent or the specify the name of a page for the root page. If these are added then the source for the metadata report will be limited to the metadata on the specified root page. 

To retrieve the metadata from a related group of pages to a specified root page, you must use the Pages option.

The Pages option can be used with the Labels option to select pages with a particular label from a group of related pages.


Additionally you can use the {metadata-values} macro to retrieve and display a simple list of metadata and their values from a single page.

Related Comala Metadata macros

Other resources

  • No labels