Confluence bridge for Content by label
Last modified by admin on 2024/10/04 17:40
The contentbylabel macro is a bridge between Confluence and XWiki. It displays a list of documents given a list of tags or a complex query in the Confluence Query Language (CQL) syntax.
Parameters
Parameter | Description | Required | Default |
---|---|---|---|
labels | A list of tags to use, separated by a comma or a space. This value is ignored if the cql parameter is set. | If cql is not given | (empty) |
operator | Whether all the tags should match (AND), or any (OR). This value is ignored if the cql parameter is set. | No | OR |
max | Maximum number of results | No | (unset) |
sort | What to sort on. The only supported values are "modified", "creation" and "title" for now. Ignored if an order by clause is present in the cql parameter. | No | (unset) |
reverse | Whether to reverse the sort (true) or not (false). | No | false |
spaces | Confluence spaces in which to search. @self for the current space. @all for everywhere. This value is ignored if the cql parameter is set. | No | (empty) |
title | A title to display before the results | No | (empty) |
cql | A query written in the Confluence Query Language (CQL) syntax defining the list of documents to show. See the documentation. | If labels is not given. | (empty) |
showSpaces | Whether to display the Confluence space in which the documents are (true) or not (false). | No | true |
showLabels | Whether to display the tags of the documents (true) or not (false). | No | true |
type | What Confluence type of objects to show. This value is ignored if the cql parameter is set. Only known value: page. | No | (empty) |
excerpt | This parameter is ignored. Whether to show excerpts of documents (true) or not (false). | No | false |
excerptType | This parameter is ignored. Whether to show "simple" excerpts or "rich content" excerpt. | No | (unset) |
Example Usage
{{confluence_contentbylabel cql="label = 'contentbylabelexample' and space = currentSpace()" showSpace="false" sort="title" title="This is the title of a contentbylabel macro" max="5" reverse="true" type="page" labels="contentbylabelexample" spaces="@self"/}}
Result:
This is the title of a contentbylabel macro