Generate a list of pages with no label

Generate a list of pages with no label

Scenario

This recipe lets you display a list of the pages in a space without labels.

Result

Recipe

Apps

Reporting for Confluence Data Center

Level

Easy

Estimated time

5 minutes

Macros

Content Reporter, Number Filter, Report Column, Report Info, Report Table

Suppliers

Collection Supplier, Content Supplier

Storage format

You can copy and paste this code into the Confluence Source Editor:

<ac:structured-macro ac:macro-id="7e58fd8b-9395-461a-83f2-c0060badca6b" ac:name="report-table" ac:schema-version="1"> <ac:rich-text-body> <ac:structured-macro ac:macro-id="0cacaee4-e415-4d3d-b355-f80dbcbb70d1" ac:name="content-reporter" ac:schema-version="1"> <ac:parameter ac:name="types">page</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="106574b7-f137-4e61-b33d-7f572e199f62" ac:name="number-filter" ac:schema-version="1"> <ac:parameter ac:name="minValue">0</ac:parameter> <ac:parameter ac:name="maxValue">0</ac:parameter> <ac:parameter ac:name="">content:labels&gt;collection:size</ac:parameter> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="de4a78f6-5a07-4b21-9ffb-154c2f4851e7" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Title</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="8d2433f4-d5df-489f-8274-04040e85c4d1" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">content:title</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="e96e8582-1c37-4db7-8e55-e2971d4463a9" ac:name="report-empty" ac:schema-version="1"> <ac:rich-text-body> <p> <em>No pages without labels in this space.</em> </p> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro>

Macro structure

You can recreate the example in the editor view:

Steps

  1. Create a Report Table macro.

  2. Within the Report Table macro, create a Content Reporter macro with the Types parameter set to page.

  3. Within the Content Reporter macro, create a Number Filter macro with the Key set to content:labels>collection:size.

  4. Under the Content Reporter macro, create a Report Column macro with the Title parameter set to Title.

  5. Within the Report Column macro, create a Report Info macro with the Key set to content:title.

  6. Under the Report Column macro, create a Report Empty macro.

  7. Within the Report Empty macro body, enter the sentence No pages without labels in this space.

  8. Optionally, italicize the sentence in the Report Empty macro body.