Generating a List of Redirecting Pages

Scenario

The Redirect macro (from the add-on Redirection for Confluence) allows you to set a page redirection. This is useful to redirect users from an old page to a new one, especially after removing or updating pages.

This recipe generates a list of pages containing the Redirect macro. A non-redirecting link is included with additional options to View, Edit, or Remove the page.


Result


Recipe

Ingredients

Add-ons

Platform

N/A

Level

INTERMEDIATE

Estimated time

20 minutes

Macros

Suppliers

Storage format

Macro structure

You can recreate the example in the editor view:

Steps

  1. Create a Report Table macro.

  2. Within the Report Table, create a Content Reporter macro.
    Enter "@global" in the field for the Spaces parameter.
    Enter "+page" in the field for the Types parameter.

  3. Within the Report Table but under the Content Reporter, create a Report Column macro.
    Set the Title parameter to "Page Title".

  4. Within the Report Column macro, create a Report Info macro.
    Set the Key parameter to "page:title".

  5. Create another Report Column macro under the other one you just created.
    Set the Title parameter to "Space".

  6. Within the Report Column macro, create a Report Info macro.
    Set the Key parameter to "page:space".

  7. Create yet another Report Column macro under the last one you created.
    Set the Title parameter to "Actions".
    Ensure the Injected parameter is true.

  8. Within the Report Column macro, create a Report Link macro.
    Set the Key parameter to "page:url".
    Set the URL postfix parameter to "?&redirect=false".
    Within the Report Link macro, type in "Link".

  9. Back in the last Report Column macro and under the Report Link macro, create a Link to Location macro.
    Set the Location parameter to page edit.
    Enter "Edit" in the Link Text parameter.
    Enter "%title%" in the field for the Content parameter.

  10. Create another Link to Location macro right next to the one you just created.
    Set the Location parameter to page remove.
    Enter "Remove" in the Link Text parameter.
    Enter "%title%" in the field for the Content parameter.