How can I list FAQ entries with a specific tag?

I tried the FAQ application macro with a filter.
In the docu it says that the filter is the where clause of an HQL and there is actually an HQL example for my case here: https://extensions.xwiki.org/xwiki/bin/view/Extension/Query%20Module

so I tried it with:
filter="obj.className='XWiki.TagClass' and obj.name=doc.fullName and obj.id=prop.id.id and prop.id.name='tags' and (lower(item)=lower('kubernetes'))"

but with no luck

I just had the same issue and found your question, but sadly with no answer.

However in this comment ([XWIKI-8313] Livetable Filter by Tag - XWiki.org JIRA) for the ticket it is described that one can simply filter with the tag parameter.

Such as

{{faq filter="space=Foo.Bar&tag=foo" /}}

I guess you’re referring to the filter parameter of the {{faq}} macro.

I’ve checked and the filter macro param is used here: application-faq/FAQMacro.xml at master · xwiki-contrib/application-faq · GitHub

I’ve then found that this extraParams field is used at xwiki-platform/macros.vm at a3eae53a6fce407cc7478f39f87000de69aaf96e · xwiki/xwiki-platform · GitHub (in the #livetable velocity macro call).

So the filter parameter is going to end up in the URL used to get the JSON data for the livetable. So for me, the documentation is wrong and passing some HQL content cannot work.

I’ve now updated https://extensions.xwiki.org/xwiki/bin/view/Extension/FAQ%20Application#HFAQMacro

Thanks

PS: I’m not sure why space=... works :slight_smile:

ok it works because $request.space is used at application-faq/FAQJSON.xml at master · xwiki-contrib/application-faq · GitHub

ok it works because $request.space is used at application-faq/FAQJSON.xml at master · xwiki-contrib/application-faq · GitHub