Checking Whether a Page Exists

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

Ingredients

Apps

Reporting for Confluence Server

Macros

Report Block, Report Body, Report Empty

Suppliers

Value Supplier

Guide

  1. Create a Report Block macro.

  2. Within that Report Block macro, create a Local Reporter macro.
    For the Key parameter, type "value:content" followed by the name of a page available in your space.
    For the purposes of this example, we have typed in "value:content Recipes".

  3. Now, still, within the same Report Block macro, create a Report Body macro.
    Within that Report Body macro, type "The page exists!"

  4. Still, within the same Report Block macro, create another Report Empty macro.
    Within that Report Body macro, type "The page does not exist!"

  5. You should now have something that looks like this:

  6. Now click Save and view the results.
    Try also changing the Key parameter in the Local Reporter macro to a non-existent page (in this example, the page name "Recipes"). 

Notes

  • Not applicable.

Result

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