This page last changed on Jun 18, 2007 by rosie@atlassian.com.

The Blog Posts Macro allows you to display news items within a page. Clicking on a title takes you to the news item.

Blog Posts Macro

What you need to type What you will get
{blog-posts} No news found.

Optional Parameters

Parameter name Default Description
default parameter 15 Specify the number of posts you want to display.
content entire Specify 'content=excerpts' to display short excerpts, or 'content=titles' to display a list of posts.
time no limit
Specify from how far back in time you want items displayed, using 'h' (hours) or 'd' (days).
labels none Display posts that match the specified label(s).
spaces @all Display posts from the specified space(s). Specify '@all' for all spaces, the space key for a global space, or '~username' for a personal space. Separate multiple space keys with commas.

Examples of Optional Parameters

1. Specify the number of posts you want displayed

{blog-posts:1}

2. Display the content in its entirety, as short excerpts, or as a list of titles

Excerpts

{blog-posts:content=excerpts}

Titles

{blog-posts:content=titles}

3. Choose from how far back in time you want items displayed

For example, "time=12h" would display those items created in the last twelve hours, and "time=7d" would show items made in the last week. (The default is no limit)

Hours

{blog-posts:time=12h}

Days

{blog-posts:time=7d}

4. Filter items using labels

  • To display content with any of the specified labels:

The following code will display items that contain either of the labels, 'atlassian' or 'confluence'

{blog-posts:labels=atlassian,confluence|}
  • To display content with all of the specified labels:

The following code will display content with both labels 'atlassian' and 'confluence'

{blog-posts:labels=atlassian,confluence|match-labels=all}

5. Filter items using spaces

  • The following code will display items from the 'Marketing' space (whose key is 'MKTG') and Joe Smith's personal space:
    {blog-posts:spaces=MKTG,~jsmith}



6. Filter items by combining parameters

The following code will display the latest 10 items in the 'Marketing' space with the label 'logo'. The items will be displayed as a list.

{blog-posts:10|labels=logo|spaces=MKT|content=title}
RELATED TOPICS

Working with Macros
Working with News Overview

Take me back to [Confluence 2 User Guide]

Document generated by Confluence on Oct 10, 2007 18:37