To display all pages with the label needs-fixing, use:
Working Example of Usage
Below is a working example of the 'Content by Label' macro. In the example, we have restricted the display to 5 results. By default, Confluence lists all the labels for each result displayed. See the optional parameters below for more information.
Filter the results by author. The macro will display only the pages etc which are written or updated by the author(s) you specify here.
You can specify one or more authors, separated by a comma or a space.
To exclude content which was created or updated by a specific user, put a minus sign (-) immediately in front of the username. For example: If you specify a username of -hpotter you will get only content which the user 'hpotter' has neither created nor edited.
To indicate that the results must have been created or updated by least one of the specified users, simply list the usernames separated by commas. For example: If you specify usernames of -hpotter,hgranger,adumbledore you will get content which has been created/updated by either 'hgranger' or 'adumbledore' (or both) but 'hpotter' has not touched.
To indicate that the results must have been created or updated by a specific user, put a plus sign (+) immediately in front of the username. For example: If you specify the usernames as +hgranger,+adumbledore you will get content which has been updated by at least two people, being 'hgranger' and 'adumbledore'.
label
None
This parameter is required.
Use this parameter to filter the results by label. The macro will display only the pages etc which are tagged with the label(s) you specify here.
You can specify one or more label values, separated by a comma or a 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 at least one of the specified label values, simply list the labels separated by commas. For example: If you specify a label value of -badpage,goodpage,superpage you will get content which has a label of either 'goodpage' or 'superpage' (or both) but does not have the label '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'.
labels
Exactly the same as label above.
max
15
Specify the maximum number of results to be displayed. Note that the results are sorted first, and then the maximum parameter is applied.
maxResults
15
Exactly the same as max above.
operator
OR
The operator to apply to the supplied lists of labels. By default, a page with any of the non-prefixed labels (that is, labels without a plus (+) or minus (-) sign immediately preceding it) will be listed. By using operator=AND, only pages with all of the supplied non-prefixed labels will be listed.
Be aware that this parameter only modifies the behaviour of the label parameter and only affects label values without a plus (+) or minus (-) sign prefix. If you intend to use the label parameter with '+' or '-' signs prefixing any of its label values, then to avoid confusion, it is not recommended that the operator parameter be used in the same macro.
The operator parameter is available to provide support for Confluence content which was written using older versions of the Content by Label macro, when at the time, this parameter was the only mechanism available to implement logical operations on a set of label values.
showLabels
true
Show or hide labels for results
showSpace
true
Show or hide spaces for results
reverse
false
Use this parameter in conjunction with the sort parameter described below. Set reverse=true to change the sort from ascending to descending.
Note: this parameter is ignored if the sort parameter is not specified.
sort
modified
Specify how the results should be sorted. To change the sort order from ascending to descending, use the reverse parameter described above.
Note: If this parameter is not specified, the sort order defaults to descending order based on the last modification date.
Values:
creation — Sort by the date on which the content was added.
title — Sort alphabetically by title.
modified — Sort by the date on which the content was last updated.
space
@all, i.e. all spaces in your Confluence site.
(In Confluence versions 2.10.0 and 2.10.1, the default is @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 etc which belong to the space(s) you specify here.
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 least one of the specified spaces, simply list the space keys separated by commas. For example: If you specify the space keys of YOURSPACE,GOODSPACE you will get content from both YOURSPACE and GOODSPACE.
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.)
@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.
spaces
Exactly the same as space above.
title
None
Adds a title or heading to the list.
type
all
This parameter allows you to filter content by content type. The macro will display only the content of the type you specify here.
You can specify one or more 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 -comment you will get pages, news items and all other content except comments.
To indicate that the results must be of a given content type, put a plus sign (+) immediately in front of that content type. For example: If you specify a label value of +comment you will get only comments. You will get the same results if you specify a single value of comment. (Note that this is not particularly useful, because each content item belongs to one content type only. If you put a plus sign next to one content type and list other content types too, the other content types will be ignored.)
To indicate that the results must match at least one of the specified content types, simply list the content types separated by commas. For example: If you specify a content type of comment,page you will get comments and pages.