This page last changed on Sep 02, 2011 by pwatson.
The Content by Label macro shows links to content which has been tagged with specific labels. | |
Using the Content by Label MacroTo add the Content by Label macro to a page:
- In the Confluence editor, choose Insert > Other Macros.
- Find and select the required macro.
Working Example of UsageBelow is a working example of the Content by Label macro, displaying content with the label "LDAP".
No content found for label(s) LDAP. |
Parameters
When editing, you can click on the macro placeholder and choose Edit to display the parameters for this macro in the Macro Browser.
Parameters are options that you can set for Confluence macros to control the content or format of the macro output. The table below lists parameters for this macro that can be set in the Macro Browser. Parameter | Default | Description |
---|
Label(s) | None | Filter by label(s) — only that content tagged with the label(s) specified is displayed. This parameter is required. Specify one or more labels, separated by a comma or a single space.
- To exclude content which matches a given label, put a minus sign (-) immediately in front of that label value. For example: If you specify a label value of
-badpage you will get only content which is not labelled with 'badpage'.
- To indicate that the results must match a given label value, put a plus sign (+) immediately in front of that label value. For example: If you specify a label value of
+superpage,+goodpage you will get only content which has at least two labels, being 'superpage' and 'goodpage'.
| Author(s) | None | Filter by author — only that content created or updated by the author(s) specified is displayed. Specify one or more authors, separated by a comma. | Include this Content Type Only | all | Filter by content type — only content of the type specified is displayed. Specify one or more content types, separated by a comma or a space.
To exclude content of a given content type, put a minus sign (-) immediately in front of that content type. For example: If you specify a content type of -blogpost you will get pages and all other content except for blog posts. Available values: | Show Labels for Each Page | true | Show or hide labels for results. | Show Space Name for Each Page | true | Show or hide spaces for results. | List Title | None | Adds a title or heading to the list. | Maximum Number of Pages | 15 | Limits the maximum number of results to be displayed. Note that the results are sorted first, and then the maximum parameter is applied. | Display Excerpts | false | Includes excerpts from each page listed. Note that you must have defined excerpts on each of those pages, by adding the excerpt macro to the page. Only the first few lines of the excerpt for each page are displayed. | Restrict to these Spaces | @all | Filter by space — only that content which belongs to the space(s) specified is displayed. You can specify one or more space keys, separated by a comma or a space.
- To exclude content in a specific space, put a minus sign (-) immediately in front of that space key. For example: If you specify a space key of
-BADSPACE you will get only content which is not in the BADSPACE.
- To indicate that the results must come from a specific space, put a plus sign (+) immediately in front of that space key. For example: If you specify a space key of
+GOODSPACE you will get only content in GOODSPACE. (Note that this is not particularly useful, because each content item belongs to one space only. If you put a plus sign next to one space key and list other space keys too, the other space keys will be ignored.)
Special values:
@self — The current space.
@personal — All personal spaces.
@global — All global spaces.
@favorite — The spaces you have marked as favourite.
@favourite — The same as @favorite above.
@all — All spaces in your Confluence site.
* — The same as @all above.
When specifying a personal space, remember to use the tilde (~) sign in front of the username, such as ~jbloggs or ~jbloggs@example.com .
| Operator | OR | The operator to apply to the labels specified in Label(s): - OR — Pages with any of the non-prefixed labels are listed.
- AND — Pages with all of the specified non-prefixed labels are listed.
Note that this parameter only modifies the behaviour of the Label(s) parameter and only affects label values without a plus (+) or minus (-) sign prefix.
| Sort By | modified | Specify how the results should be sorted. Values:
- title — Sort alphabetically by title.
- creation — Sort by the date on which the content was added.
- modified — Sort by the date on which the content was last updated.
Note: If this parameter is not specified, the sort order defaults to descending order based on the last modification date (i.e. latest first). To change the sort order from ascending to descending, use the Reverse Sort parameter. | Reverse Sort | false | Select Reverse Sort to change the sort from descending to ascending. Use this parameter in conjunction with the Sort By parameter — Reverse Sort is ignored if Sort By is not specified. |
Related TopicsRelated Labels Macro Navmap Macro Recently Used Labels Macro Working with Labels Working with Macros Take me back to the Confluence User's Guide.
|