Blog Posts Macro
The Blog Posts macro allows you to display blog posts on a Confluence page. Clicking on a title takes you to the blog post.
Using the Blog Posts Macro
To add the Blog Posts macro to a page:
- From the editor toolbar, choose Insert > Other Macros
- Find and select the required macro
Speed it up with autocomplete: Type { and the beginning of the macro name, to see a list of suggested macros. In this example we're inserting the cheese macro.
To edit an existing macro: Click the macro placeholder and choose Edit. This will open the macro details, so you can edit the macro parameters.
Parameters
Parameters are options that you can set to control the content or format of the macro output. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example
).
Parameter | Required | Default | Description |
---|---|---|---|
Content Type to Display ( | No | titles | Available values:
|
Time Frame | No | no limit | Specify how far back in time Confluence should look for the blog posts to be displayed.
|
Restrict to these Labels | No | None | Filter the results by label. The macro will display only the blog posts which are tagged with the label(s) you specify here.
|
Restrict to these Authors | No | None | Filter the results by author. The macro will display only the blog posts which are written by the author(s) you specify here. |
Restrict to these Spaces | No | @self, i.e. the space which contains the page on which the macro is coded | This parameter allows you to filter content by space. The macro will display only the pages which belong to the space(s) you specify here.
When specifying a personal space, remember to use the tilde (~) sign in front of the username, such as |
Maximum Number of Blog Posts | No | 15 | Specify the maximum number of results to be displayed. Note that the results are sorted first, and then the maximum parameter is applied. |
Sort By | No | creation | Specify how the results should be sorted. If this parameter is not specified, the sort order defaults to descending order (newest first) based on the creation date.
|
Reverse Sort | No | false | Select to change the sort from descending to ascending order (oldest first). Use this parameter in conjunction with the Sort By parameter. This parameter is ignored if the Sort By parameter is not specified. In storage format and wikimarkup a value of |
Wiki markup example
This example is useful when you want to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.
Macro name: blog-posts
Macro body: None.
{blog-posts:content=titles|spaces=@self,ds|author=jsmith|time=4w|reverse=true|sort=creation|max=10|label=chocolate,cookies}