List blog post summaries
Scenario
There may be cases where you may want to aggregate blog posts on a Confluence instance in a page. By using the Content Reporter, you can do exactly that.
This recipe lists all blog posts from all spaces together with their summaries.
Result
Recipe
Apps | Reporting for Confluence Data Center |
|---|---|
Level | Easy |
Estimated time | 10 minutes |
Macros | Content Reporter, Report Column, Report Info, Report Table |
Suppliers | Content Supplier |
Storage format
You can copy and paste this code into the Confluence Source Editor:
<p class="auto-cursor-target">
<br />
</p>
<ac:structured-macro ac:macro-id="0b2be6c8-38eb-4af6-abb6-012725a2f155" ac:name="report-table" ac:schema-version="1">
<ac:rich-text-body>
<p class="auto-cursor-target">
<br />
</p>
<ac:structured-macro ac:macro-id="b6cfc5f2-c305-41b5-ad70-e34cd24e9945" ac:name="content-reporter" ac:schema-version="1">
<ac:parameter ac:name="type">news</ac:parameter>
<ac:parameter ac:name="space">
<ri:space ri:space-key="@all" />
</ac:parameter>
<ac:rich-text-body>
<p>
<br />
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br />
</p>
<ac:structured-macro ac:macro-id="4f26c099-76b6-48b7-9895-1cbd9ae29341" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="title">Blog Posts</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="815283b4-ec94-470a-83c0-4455a25d47a0" ac:name="report-info" ac:schema-version="1">
<ac:parameter ac:name="">content:title</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br />
</p>
<ac:structured-macro ac:macro-id="00b2b5ba-dd44-47bb-91f2-cfd0d8710b82" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="title">Summaries</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="43389236-d09a-4cc3-83e9-d47c90f5acf7" ac:name="report-info" ac:schema-version="1">
<ac:parameter ac:name="">content:summary</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br />
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br />
</p>Macro structure
You can recreate the example in the editor view:
Line-by-line explanation
Line | Description |
|---|---|
1 | The Report Table macro formats the report as a table. |
2 | The Content Reporter macro retrieves all blogs from all spaces, with Spaces set to |
3 | Two Report Column macros create two table columns with titles set accordingly - |
4 | The Report Info macro within the Blog Report Column macro displays the name of each blog retrieved from Content Reporter, with the Key set to |
5 | The Report Info macro within the Summary Report Column macro displays the summary of each blog retrieved from Content Reporter, with the Key set to |