Greetings My objective is to list every document with some tag (e.g. "MainTag"), and next, select all tags of these documents without repeating any of them (including "MainTag").
I tried to merge the next two queries but without sucess. This query selects every document that have the tag "KB-4D": #set($sql = ", BaseObject as obj, DBStringListProperty as prop where obj.name=doc.fullName and obj.className='XWiki.TagClass' and obj.id=prop.id.id and prop.id.name='tags' and 'KB-4D' in elements(prop.list) order by doc.name asc") #set ($list = $xwiki.searchDocuments($sql)) This query selects every tags present in the documents listed by the previous query: #set($sql = "select distinct elements(prop.list) from BaseObject as obj, DBStringListProperty as prop where obj.className='XWiki.TagClass' and obj.id=prop.id.id and prop.id.name='tags' and obj.name='$item'") #set ($tags = $xwiki.search($sql)) Can anyone help me with this? Thanks in advance Bruno Neves PS: How can I put snippet code on code.xwiki.org? I need to login but I am not registered. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

