Listing Contents with Specific Text or Macros

Scenario

There may be times when it is useful to look for pages that uses a specific macro that the user wants to amend.

This recipe generates a list of contents that contains a specific text or macro.


Result


Recipe

Ingredients

Add-ons

Reporting

Platform

Level

EASY

Estimated time

10 minutes

Macros

Suppliers

Storage format

Macro structure

You can recreate the example in the editor view:

Steps

Line

Description

1

The report will be formatted as a table with Report Table

2

Content Reporter is used retrieve all contents in Confluence, with space parameter set to '@all'.

3

The contents retrieved from Content Reporter is filtered for the desired text or macro. This is done with Text Filter, setting supplier key to 'Content Supplier Supplier Keychains Body Supplier'. The first part 'Content Supplier' retrieves the body of each content from the Content Reporter. This is then chained using '>' sign to Body Supplier, which supplies the storage text for the bodies. Required parameter is set to true to filter out blank texts, and include parameter is set to '.*macroname.*', i.e. the name of the macro.'

4

Two columns is created Report Column, with title set accordingly.

5

Title of each content is displayed via Report Info, setting supplier key to 'Content Supplier'.

6

The number of matches with 'macroname' for each content is displayed with Report Info, setting supplier key to 'Content Supplier Supplier Keychains Body Supplier Supplier Keychains Text Supplier Supplier Keychains Collection Supplier'. The first part 'Content Supplier' retrieves the body of each content from the Content Reporter. This is then chained using '>' sign to Body Supplier, which supplies the storage text for the bodies. This is in turned chained to 'Text Supplier' which retrieves the collection of matches for 'macroname'. Finally this collection is chained to 'Collection Supplier' to get the number of items in the list.