The Live Data Macro includes an example for filtering by tags, but it doesn’t work for me. The documentation proposes:
{{liveData
id="documents"
properties="tags,doc.name"
source="liveTable"
filters="tags=aaa&tags=bbb"
sourceParameters="className=XWiki.TagClass&translationPrefix=platform.index."
}}
{
"meta": {
"propertyDescriptors": [
{
"id": "tags",
"visible": false
}
]
}
}
{{/liveData}}
What works for me is not using XWiki.TagClass
at all, to leave out tags
from the properties
statement, and use tag
instead of tags
in the filter
statement. After making these changes, the meta
description becomes unnecessary. Filtering multiple tags works by using tag=aaa&&bbb
instead of tags=aaa&tags=bbb
:
{{liveData
id="documents"
properties="doc.name"
source="liveTable"
filters="tag=aaa&&bbb"
sourceParameters="className=WhateverClass&translationPrefix=platform.index."
}}
{{/liveData}}
I’d like to update the documentation to reflect the example that actually works without XWiki.TagClass
, but I also don’t want to remove information that might still be correct and helpfull. What confuses me is the different syntax for filtering with and without XWiki.TagClass
.
The question now is: Is the documentation correct, is it incorrect, or is filtering by tags without using XWiki.TagClass
just another example that works as well?