Schoaf
June 28, 2021, 7:13pm
1
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 (Loading... ) 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/application-faq-ui/src/main/resources/FAQCode/FAQMacro.xml at master · xwiki-contrib/application-faq · GitHub
I’ve then found that this extraParams
field is used at xwiki-platform/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/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