---
title: "blog-posts-report macro"
canonical: "https://support.appfire.com/space/COMALACM/655759672/blog-posts-report%20macro"
format: markdown
---
> Macro (aura-html)

## <span style="color: #091e42">Overview</span>

<span style="color: #091e42">The </span>`blog-posts-report`<span style="color: #091e42"> </span><span style="color: #333333">macro generates a tabular report of all the metadata from matching blog posts in a particular space.</span>

## <span style="color: #091e42">Parameters</span>

| Parameter | Required | Default | Notes | Version |
| --- | --- | --- | --- | --- |
| `value-name`<br>(unnamed first parameter) | ![image](media://833f001f-58fc-4a83-8086-a62fe3aeb68d) |  | <span style="color: #000000">The list of fields (columns) is a comma-separated list to be included in the report. This can include Comala Metadata app custom metadata and </span><span style="color: #000000">[internal metadata.](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656578765)</span> |  |
| `key` |  |  | Specifies the space from which the blog posts are listed |  |
| `sort` |  |  | <span style="color: #000000">Specifies which column in the report should be sorted by. You can include a sort method such as</span><br>- `value-name desc`
- `value-name desc`<br><span style="color: #000000">You can also specify how to treat the values:</span><br>- `as date`<span style="color: #000000"> (for internal date field) metadata only</span>
- `as number`
- `as string` (makes sort case insensitive) |  |
| maxResults |  | `500` | Specifies a comma-separated list of the metadata value names to be summed. |  |
| `totals` |  |  | Specifies a comma-separated list of columns (metadata `value-name` (s)) to be summed. |  |

## Usage

To retrieve the metadata values from matching blog posts

- Add the **Blog post macro** using the Confluence macro editor

![image](media://df92083c-c4a5-4e86-b0ef-8bc6277de022)

At least one metadata value name is required to be added for the macro.

![image](media://30848dae-9fe8-4359-8dfd-25081112760f)

No content is required for the macro body. The macro placeholder simply displays the entered metadata and any other options chosen.

![image](media://420114bb-77cc-42ca-ac3e-daa6d4970f02)

The macro on the page displays a report for the blog posts with:

- Multiple metadata names as a comma-separated list to create the columns in the report
- Values for each metadata name as entries in each column

The content can be limited by configuring the macro to specific spaces using the space key. If the space key is left empty, the report defaults to the current space.

The values in specific columns of the report (if the retrieved values are in an applicable format) can be summed by adding the metadata names in a comma-separated list in the macro editor `totals` option.

## Reference markup

```plaintext
{blog-posts-report:Poster,Blog Post,Time, Comments|sort=Blog Post asc|maxResults=3}
```

This displays the following on the page.

![image](media://1c949caa-e9bb-4722-9ea4-57b1db1fb9d5)

## Related macros

> Macro (children)

## Related pages

- [Reporting and Searching](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656577723)