Hi.
I want to list all pages with specific tag with a xwql query as I want to have later the possibility to enlarge the query to reduce it to a specific space.
This is what I have so far but it’s not working. Without the “if” it will list all articles with any tag.
#set($allDocWithTag = $services.query.xwql('from doc.object("XWiki.TagClass") as tags order by doc.space').addFilter('unique').execute())
#foreach($doc in $allDocWithTag)
#if($doc.getObject('XWiki.TagClass', 'Tags', 'test'))
$doc
#end
#end
I’m aware of [Solved] Display a list of pages with a specific tag - #10 by Mayot
#set ($list = $xwiki.tag.getDocumentsWithTag('test'))
#foreach($reference in $list)
#set ($document = $xwiki.getDocument($reference))
#set ($label = $document.getTitle())
[[$label>>$reference]]
#end
But as i said I later want to search only for articles with that specific tag inside a specific space. And I don’t see a good possibility for that with the second approach.
Any hints for me?
Regards, Simpel