Customizing a Report with Image Attachments

Generate a report on the current page's children pages with a column to show the link to each child page as an image, instead of text. Each image is a hyperlink to the respective child page, as shown in the example below.

Result

 

 

Recipe

Apps

Reporting for Confluence Server & Data Center

Apps

Reporting for Confluence Server & Data Center

Level

Easy

Estimated time

5 minutes

Macros

Local Reporter, Report Column, Report Info, Report Link, Report Table, Report Wrapper

Suppliers

Page Supplier

Storage format

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

<ac:structured-macro ac:macro-id="681bc331-c99a-449d-9b0d-e5da8e6bc31e" ac:name="report-table" ac:schema-version="1"> <ac:rich-text-body> <ac:structured-macro ac:macro-id="7dd5026d-c36b-444a-a133-02c92b4551a9" ac:name="local-reporter" ac:schema-version="1"> <ac:parameter ac:name="source">CWIKI:Wiki Information</ac:parameter> <ac:parameter ac:name="">page:children</ac:parameter> <ac:rich-text-body> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="a625d2cd-3d67-4b31-bb68-d976fc67f14e" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Link</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="3a76f9d9-975a-43a4-9205-6a3a034e8fad" ac:name="report-link" ac:schema-version="1"> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:parameter ac:name="">page:url</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="c9876a94-ee0d-48b8-812f-7d74f9672f7d" ac:name="report-wrapper" ac:schema-version="1"> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p> <ac:image ac:thumbnail="true" ac:width="50"> <ri:attachment ri:filename="visitLinkIcon.png"/> </ac:image> </p> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="6a2b2f3f-3c8f-4833-9f0b-bf101b2f50d0" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Page</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="a34c0e79-897e-4602-8b85-80da4d221876" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">page:title</ac:parameter> </ac:structured-macro> </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

  • N/A

Line-by-Line Explanation

  • N/A