Confluence Content

Ways to include, summarise or refer to other Confluence content.

Notation Comment
{excerpt}Confluence is a knowledge-sharing application that enables teams to communicate more effectively{

{excerpt:hidden=true}This excerpt will be recorded, but will not be displayed on the page.{
Marks some part of the page as the pages excerpt. This doesnt change the display of the page at all, but other macros (for example children, excerpt-include and blog-posts) can use this excerpt to summarise the pages content.
  • hidden: If the value of "hidden" is true, then the contents of the excerpt macro will not appear on the page.
{include:Home}

{include:FOO:Home}

{include:spaceKey=FOO|pageTitle=Home}
Includes one page within another (this example includes a page called "Home"). Pages from another space can be included by prefacing the page title with a space key and a colon.

The user viewing the page must have permission to view the page being included, or it will not be displayed.

{excerpt-include:Home}

{excerpt-include:Home|nopanel=true}
Includes the excerpt from one page (see the excerpt macro) within another. The included page must be in the same space as the page on which the macro is used.
  • nopanel: If the value of "nopanel" is true, then the excerpt will be drawn without its surrounding panel.
{search:query=my_query}

{search:query=my_query|maxLimit=x}
Does an inline site search.
  • query: your query
  • maxLimit=x: (where x is any number > 0) to limit the search result to a number of results.
  • spacekey: specify the key of the space you want to search in
  • type: specify the content type (could be page, comment, blogpost, attachment, userinfo, spacedesc)
  • lastModified: specify a time period in which the content was last modified: (e.g. 3d = modified in the last 3 days, 1m3d = modified in the last month and three days)

Example:

Title (Space) Updated
Home (My Space)
This is the home page for My Space.
Jan 06, 2004 by fred
PDF File file-containing-home.pdf ( download) Jan 06, 2004 by fred

{children}

{children:all=true}

{children:depth=x}

{children:depth=x|style=h3}

{children:excerpt=true}

{children:page=Another Page}

{children:page=/}

{children:page=SPACEKEY:}

{children:first=x}

{children:sort=<mode>|reverse=<true or false>}
Displays the children and descendants of the current page. Specify all=true to show all descendants of this page, or depth=x (where x is any number > 0) to show that many levels of descendants.

The style attribute can be any of h1 through h6. If you specify a style, the top level of child pages will be displayed as headings of that level, with their children then displayed as lists below. A great way to throw together a quick contents page!

You can view the children of a different page in the same space with {children:page=Another Page Title}.

If you specify a page of /, you will list all the pages in the space with no parent (i.e. the top-level pages), excluding the current page

If you specify a page of FOO: (the colon is required), you will list all the pages with no parent in the space with key "FOO".

Specify excerpt=true to also display the first line of the pages excerpt (see the excerpt macro) if it exists.

Example:

  • child
  • another child
  • child
    • first grandchild
  • another child

The sort attribute is an optional attribute that allows you to configure how the children are sorted. Specify creation to sort by content creation date, title to sort alphabetically on title and modified to sort of last modification date. Use the reverse attribute to optionally reverse the sorting.

The first attribute allows you to restrict the number of children displayed at the top level.

{blog-posts:5}

{blog-posts:5|content=excerpts}

{blog-posts:5|content=titles}

{blog-posts:time=7d}

{blog-posts:15|time=14d|content=excerpts}

{blog-posts:labels=confluence,atlassian}

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

Displays the most recent news items in this space.

The first parameter controls how many news items to display (default: 15)

The content parameter lets you choose whether to display each news item in its entirety (the default), just short excerpts from each item (see the excerpt macro), or just a list of posts titles.

The time parameter lets you choose how far back to look for news items. For example, "time=12h" would show you those items made in the last twelve hours, and "time=7d" would show items made in the last week. (The default is no limit)

The labels parameter lets you specify a list of labels that will be used to filter the blog posts that are returned. By default, blog posts that match any of the specified labels are returned. To return the blog posts that match all of the specified labels, add match-labels=all as a parameter.

!quicktime.mov!

!spaceKey:pageTitle^attachment.mov!

!quicktime.mov|width=300,height=400!

!media.wmv|id=media!
Embeds an object in a page, taking in a comma-separated of properties.

Default supported formats:
  • Flash (.swf)
  • Quicktime movies (.mov)
  • Windows Media (.wma, .wmv)
  • Real Media (.rm, .ram)
  • MP3 files (.mp3)

Other types of files can be used, but may require the specification of the "classid", "codebase" and "pluginspage" properties in order to be recognised by web browsers.

Common properties are:
  • width - the width of the media file
  • height - the height of the media file
  • id - the ID assigned to the embedded object

Due to security issues, files located on remote servers are not permitted
Styling
By default, each embedded object is wrapped in a "div" tag. If you wish to style the div and its contents, override the "embeddedObject" CSS class. Specifying an ID as a property also allows you to style different embedded objects differently. CSS class names in the format "embeddedObject-ID" are used.
{content-info:value=title}Untitled page{content-info}
{content-info:^attachment.ext|value=creation|format=dd-MMM-yyyy}Anonymous{content-info}
{content-info:SPACE:Page|value=viewCount|type=gif|images=customgif}Unviewed{content-info}
{content-info:SPACE:Page^attachment.ext|value=lastModification}Never modified{content-info}
Outputs information about the specified content.
  • [default] - (optional) The content to report the view count for. Any standard Confluence link syntax is valid, although external links will not produce useful information.
  • value - (required) The value to output. One of the following:
    • id - The content's unique id.
    • title - The content title.
    • creation - The date the content was created.
    • lastModification - The date the content was last modified.
    • firstViewed - The date the content was first viewed by someone other than the creator.
    • lastViewed - The date the content was last viewed by someone other than the last editor.
    • viewCount - The number of times the content has been viewed since the firstViewed date.
For values returning a number, the following parameters may also be set:
  • digits - (optional) The minimum number of digits to output. Defaults to 1.
  • type - (optional) The type of image to use for the counter (e.g. "gif", "jpg", etc). If not set, plain text will be output.
  • images - (optional) The style of image to use if type is not text. Defaults to the built-in 'odometer' style.
For values returning a date, the following parameters may also be set:
  • format - (optional) The date format (e.g. 'dd-MMM-yyyy'). May also be 'long', 'medium' or 'short', which will use the system defaults for those formats.
{userlister}

{userlister:groups=confluence-administrators}

{userlister:online=true}

{userlister:groups=confluence-users|online=true}

Lists users registered in Confluence.

By default will list every user in the system (not recommended for installations with large numbers of users).

Supplying a groups value will list only members of those groups. The groups value supports a comma separated list of group-names.

Group: confluence-administrators
Tyler Durden (tdurden@example.com)
Marla Singer (marla@example.com)
Robert Paulsen (bob)

Specifying the online value allows you to filter the user list by the user online status. Setting online=true will show only online users, whereas setting online=false will show only offline users.

{scrollbar}

Generates a set of scroll bar links within the same page hierarchy, one previous and one next (if they exist).

  • up - (optional) if 'false', no link to the parent page will be created (default is true).
  • icons - (optional) if 'false', no icons will be generated (default is true).
  • class - (optional) set the CSS class the scrollbar table will be set to.

{toc-zone:separator=brackets|location=top}
h1. First Heading
blah blah blah...
{toc-zone}

Creates a Table of Contents for headings contained in the macro body.

  • location - (optional) The location to have the table of contents output. May be 'top' or 'bottom'. If not set, it will be output at both locations.
  • type - (optional) The type of output. May be one of the following:
    • list - (default) The headings are output in hierarchical list format.
    • flat - The headings are listed on a single line with a separator between them.
  • class - (optional) If specified, the TOC will be output with the specified CSS class. Also, if set, no other style values will be output.
  • style - (optional) The style of the list items if in list mode. The style may be any of the following:
    • none - (default) Headings are output in indented lists with no bullet points or numbers prefixing them.
    • any CSS style - Headings are output in indented lists with the specified CSS style.
      • indent: - (optional) The amount to indent each list sub-heading by (default is '10px').
      • separator - (optional) The type of separator to use if the style is 'flat'. May be one of the following:
        • brackets - Square brackets ('[' and ']') surround each item. (default)
        • braces - Curly braces ('{' and '}') surround each item.
        • parens - Parenthesis ('(' and ')') surround each item.
        • pipe - A pipe ('|') will be placed between each list item.
        • [anything] - The value will be placed between each list item. Nothing will be on the ends of the list.
      • minLevel: - (optional) The lowest heading level to include (inclusive). (default is 1).
      • maxLevel: - (optional) The highest heading level to include (inclusive). (default is 7).
      • includePages: - (optional) If 'true', any included Confluence pages will be imported and listed.
      • filter - (optional) If set, any headings not matching the regular expression will be ignored. Due to '|' being the parameter separator in macros, use '//' where you would have usually used '|'.
      • printable - (optional) If set to 'false', the table of contents will not be visible when being printed.
{toc:style=disc|indent=20px}
{toc:outline=true|indent=0px|minLevel=2}
{toc:type=flat|separator=pipe|maxLevel=3}

Creates a Table of Contents for headings on the the current page.

  • type - (optional) The type of output. May be one of the following:
    • list - (default) The headings are output in hierarchical list format.
    • flat - The headings are listed on a single line with a separator between them.
  • class - (optional) If specified, the TOC will be output with the specified CSS class. Also, if set, no other style values will be output.
  • style - (optional) The style of the list items if in list mode. The style may be any of the following:
    • none - (default) Headings are output in indented lists with no bullet points or numbers prefixing them.
    • any CSS style - Headings are output in indented lists with the specified CSS style.
      • indent: - (optional) The amount to indent each list sub-heading by (default is '10px').
      • separator - (optional) The type of separator to use if the style is 'flat'. May be one of the following:
        • brackets - Square brackets ('[' and ']') surround each item. (default)
        • braces - Curly braces ('{' and '}') surround each item.
        • parens - Parenthesis ('(' and ')') surround each item.
        • pipe - A pipe ('|') will be placed between each list item.
        • [anything] - The value will be placed between each list item. Nothing will be on the ends of the list.
      • minLevel: - (optional) The lowest heading level to include (inclusive). (default is 1).
      • maxLevel: - (optional) The highest heading level to include (inclusive). (default is 7).
      • includePages: - (optional) If 'true', any included Confluence pages will be imported and listed.
      • filter - (optional) If set, any headings not matching the regular expression will be ignored. Due to '|' being the parameter separator in macros, use '//' where you would have usually used '|'.
      • printable - (optional) If set to 'false', the table of contents will not be visible when being printed.
{attachments:patterns=.*doc|old=true}

Prints a list of attachments

  • patterns: - (optional) a comma separated list of regular expressions. Only file names matching one of these are displayed.
  • old: - (optional) if "true", display old versions of attachments as well.
  • upload: - (optional) if "true", allow the upload of new attachments.

{spaces:width=x}

Displays a list of all spaces visible to the user, with linked icons leading to various space content functionality, within a table. The width parameter expresses the specifies the table on the page.

  • width - (optional) width of table on Confluence page, defaults to 100%.

{create-space-button: size=large | width=32 | height=32}

Renders a create space button linked to the create space page.

  • size - small (size of small uses a smaller graphic, whereas size of large uses a larger one)
  • height - image height in pixels
  • width - image width in pixels

{welcome-message}

Include the Confluence site welcome message. The site welcome message may be configured in the Administration -> General Configuration section.

{global-reports: width=x}

Renders a list of links to global reports within a table of width x (defaults to 99%).

  • width - (optional) width of table on Confluence page, defaults to 50%.

{recently-updated}
{recently-updated: spaces=sales,marketing | labels=timesheets,summaries}

Include a list of which Confluence content has changed recently Content will be listed from the current space or for each space defined in a comma separated list (space = x, y). The list will be rendered in a table with width matching the width argument (width=z) or defaulting to 99%

  • spaces - (optional) comma separated list of space keys
  • labels - (optional) comma separated list of labels (content associated with at least one of these will be listed)
  • width - (optional) width of table on Confluence page, defaults to 100%.

{incoming-links}No links exist{incoming-links}

{incoming-links:style=square|excerpt=true}

{incoming-links:parent=Another Page}

{incoming-links:ancestor=A Different Page}

{incoming-links:spaces=MYSPACE}

{incoming-links:types=page,comment}

Creates a list of pages which link to the current page. Wiki content may be included as the body to be shown if no links exist.

  • mode - The mode in which incoming links are displayed. Available modes:
    • list - Links are displayed in a bullet-pointed list.
    • flat - Links are displayed in a single row, with a separator between each item.
  • separator - The style of separator to have. Defaults to ', ' when in flat mode. Available separators:
    • brackets - Each item is surrounded by square brackets ('[' and ']').
    • braces - Each item is surrounded by curly braces ('{' and '}').
    • parens - Each item is surrounded by parentheses ('(' and ')').
    • pipe - Each item is separated by a pipe ('|').
    • other - The value is the separator.
  • style - The style of the bullet points. Some styles may not be available depending on the mode. Available styles:
    • icons - displays the Confluence page-type icon (default)
    • none - no bullet point displayed
    • other CSS styles - disc, square, upper-roman, lower-roman, etc
  • parent - Will only list linking pages which are also children of the specified page.
  • ancestor - Will only list linking pages which are decendents of the specified ancestor page.
  • spaces - Will only list linking pages in the specified spaces. Spaces should be comma-separated.
  • types - Will only list linking pages of the specified types. Types should be comma-separated. Valid types include:
    • page - Wiki pages
    • blogpost - Blog/News posts
    • comment - Page or blog comments
    • spacedescription - Space description
    • userinfo - User profile
    • mail - Mail archive
  • excerpt - Will output any excerpts which have been set on the linking page.
  • sort - Allows the sort order to be specified. Valid options are:
    • natural - Sorted by the natural order of the content title. (Default)
    • creation - Sorted by the creation date of the content.
    • modified - Sorted by the last-modified date of the content.
    • bitwise - A more complex local-independent sort. Can only be used if type is 'page'.
{livesearch:spaceKey=KEY}

Show search results keystroke by keystroke.

  • spaceKey: - (optional) this option searches within a single space.

{spacegraph:spaceKey}

Displays a diagram of the pages in a space. By default it displays the current space. If a spacekey is supplied that space is displayed.

{navmap:mylabel}
{navmap:mylabel|wrapAfter=3|cellWidth=110|cellHeight=20|theme=mytheme}

Renders the list of pages associated with the specified label as a navigable map.
A label must be specified for this macro. The following parameters are all optional:

  • title - the title for this navigation map.
  • wrapAfter - the number of cells to span horizontally before wrapping to the next line. (default: 5)
  • cellWidth - width of individual cells in the map in pixels. (default: 90px)
  • cellHeight - height of individual cells in the map in pixels. (default: 60px)
  • theme - if you want to create your own look and feel for the navmap (say one with rounded corners), you can do so by adding a file to the WEB-INF/classes/templates/macros directory. The file name convention to use is: navmap-mytheme.vm. You can use whatever name you like in place of mytheme. Just make sure you specify this when calling the macro using theme=mytheme.

{related-labels}

{related-labels:labels=labelone, labeltwo}

Renders a list of labels related to the current pages labels.

  • labels - (optional) comma-separated list of labels whose related labels will be displayed.

{listlabels:spaceKey}

Renders the list of all labels or labels for a specific space sorted alphabetical.

documentation, staff, events, books, music

{contentbylabel:dogs,cats}
{contentbylabel:dogs,cats|key=PETS}
{contentbylabel:dogs,cats|type=page,blogpost}
{contentbylabel:dogs,cats|showLabels=false|showSpace=false}
{contentbylabel:dogs,cats|exerpt=true}

Displays a list of content marked with the specified labels.

  • key - (optional) restrict content to a certain space.
  • type - (optional) restrict content to a certain type (all included by default)
  • showLabels - (optional) display the labels for each results (enabled by default)
  • showSpace - (optional) display space name for each result (enabled by default)
  • title - (optional) add a title above the results list
  • maxResults - (optional) the maximum number of results to display (default is 5)
  • excerpt - (optional) display first line of excerpt for each result

{recently-used-labels}

{recently-used-labels:scope=space|count=15}

Renders a list (or table) of labels most recently used in a specified scope.

  • count - (optional) Specify the number of labels to be displayed. If not specified, a default of 10 is used.
  • scope - (optional) Allows global, space and personal. If not specified, the global scope is used. The global scope will show labels that were recently used within this confluence instance. The space scope will show labels that were recently used in the current space. The personal scope will show you personal labels that you recently used.
  • style - (optional) Allows table. Specifying a table style will render the most recently used labels in a table form.
  • title - (optional) Allows you to specify a heading for the table view of this macro. See the style option above.