Check whether a page exists

Check whether a page exists

Let's check whether a certain page exists or not in this particular Confluence space.

Ingredients

Apps

Reporting for Confluence Data Center

Macros

Report Block, Report Body, Report Empty

Suppliers

Value supplier

Guide

  1. Create a Report Block macro.

  2. Within the Report Block macro, create a Local Reporter macro with the Key parameter set to value:content followed by the name of a page available in your space.
    In this example, we set the Key parameter to value:content Recipes.

  3. Within the same Report Block macro, create a Report Body macro, and within its body macro, enter The page exists!.

  4. Within the same Report Block macro, create a Report Empty macro, and within its body macro, enter The does not page exist!.

  5. Click Save and view the results.

Macro structure

Result

Does the page "Recipes" exist on this space? The page exists!

Notes

You can try changing the Key parameter in the Local Reporter macro to a non-existent page (in this example, the page name Recipes).