This page is a snippet

For full information, see:

Snippet

 

Macro name: contentbylabel

Macro body: None.

Parameter nameRequiredDefaultParameter description and accepted values
spacesNo@all

Filters the results by space. The macro will display only the pages and other content types which belong to the space(s) you specify here.

You can specify one or more space keys, separated by a comma or a space.

Special values:

authorNo(None)

Filters the results by author. The macro will display only the pages and other content types which are written or updated by the author(s) you specify here.

You can specify one or more authors, separated by a comma.

titleNo(None)Adds a heading to the list.
showLabelsNotrueDetermines whether to display the matching labels in the list of results.
reverseNofalseUse this parameter in conjunction with the sort parameter. Set reverse=true to change the sort from ascending to descending. This parameter is ignored if the sort parameter is not specified.
sortNomodifiedDetermines how the results are sorted. To change the sort order from ascending to descending, use the reverse parameter described above.

If this parameter is not specified, the sort order defaults to descending order based on the last modification date.

Values:
maxNo15Determines the maximum number of results to be displayed. Note that the results are sorted first, and then the maximum parameter is applied.
excerptNofalseIf this parameter is set to true, the macro displays an excerpt from each page listed in the results. Note that you must define the excerpts on each of those pages, by adding the Excerpt macro to each page. If a particular page does not have an excerpt defined, then the Content by Label macro will not attempt to show an excerpt for that page. The Content by Label macro will show only the first few lines of the excerpt for each page.
labelsYes(None)Use this parameter to filter the results by label. The macro will display only the pages and other content types which are tagged with the label(s) you specify here. See also the operator parameter.

You can specify one or more label values, separated by a comma or a space.
showSpaceNotrueDetermines whether to display the spaces in the list of results.
typeNoAllFilters the restults 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.

Available values:

  • pageages.
  • blogpost or newsblog posts, also known as news items.
  • attachment – attachments.
operatorNoORThe 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. If you specify a value of AND, only pages with all of the supplied non-prefixed labels will be 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. To avoid confusion or unexpected results, we recommend that you do not use the operator parameter in conjunction with any label values prefixed with '+' or '-' signs.