all pages without any "Tags"

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

all pages without any "Tags"

Volker.Lapczynski
How do i get all pages without any Tags?
Tried this without luck:

{{velocity}}
#set($tagFilter = " and NOT IN elements(prop.list)")
#set($sql = ", BaseObject as obj, DBStringListProperty as prop where obj.className='XWiki.TagClass' and obj.id=prop.id.id and prop.id.name='tags' ${tagFilter} order by doc.fullName asc")
##set ($list = $xwiki.searchDocuments($sql))
 #foreach($item in $xwiki.searchDocuments($sql))
[[$item]]  
#end
{{/velocity}}

Volker/Oslo
Reply | Threaded
Open this post in threaded view
|

Re: all pages without any "Tags"

Marius Dumitru Florea
Try this

$services.query.hql("where doc.fullName not in (select doc.fullName
from XWikiDocument doc, BaseObject as tagObj, DBStringListProperty as
tags join tags.list tag where doc.fullName = tagObj.name and
tagObj.className = 'XWiki.TagClass' and tagObj.id = tags.id.id and
tags.id.name='tags' and tag <> '') order by
doc.fullName").setLimit(10).execute()

Hope this helps,
Marius

On Tue, Sep 3, 2013 at 12:40 PM, Volker.Lapczynski <[hidden email]> wrote:

> How do i get all pages without any Tags?
> Tried this without luck:
>
> {{velocity}}
> #set($tagFilter = " and NOT IN elements(prop.list)")
> #set($sql = ", BaseObject as obj, DBStringListProperty as prop where
> obj.className='XWiki.TagClass' and obj.id=prop.id.id and prop.id.name='tags'
> ${tagFilter} order by doc.fullName asc")
> ##set ($list = $xwiki.searchDocuments($sql))
>  #foreach($item in $xwiki.searchDocuments($sql))
> [[$item]]
> #end
> {{/velocity}}
>
> Volker/Oslo
>
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/all-pages-without-any-Tags-tp7586883.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: all pages without any "Tags"

Volker.Lapczynski
This is working on XWiki Enterprise 5.2-milestone-1:

{{velocity}}
#set($sql = ("where doc.fullName not in (select doc.fullName from XWikiDocument doc, BaseObject as tagObj, DBStringListProperty as tags join tags.list tag where doc.fullName = tagObj.name and tagObj.className = 'XWiki.TagClass' and tagObj.id = tags.id.id and tags.id.name='tags' and tag <> '')order by doc.space asc ") )
#set ($list = $xwiki.searchDocuments($sql))
 #foreach($item in $xwiki.searchDocuments($sql))
#set ($recentDoc = $xwiki.getDocument($item).getTranslatedDocument())
   ## We use HTML here because we don't have a tool to escape wiki syntax in document title.
|$recentDoc.getSpace()|{{html}}$escapetool.xml($recentDoc.plainTitle){{/html}}
#end
{{/velocity}}

Thank You!
Reply | Threaded
Open this post in threaded view
|

Re: all pages without any "Tags"

vmassol
Administrator
Hi,

On Sep 3, 2013, at 5:26 PM, "Volker.Lapczynski" <[hidden email]> wrote:

> This is working on XWiki Enterprise 5.2-milestone-1:

Cool.

Maybe you could contribute it as a snippet on extensions.xwiki.org?

Thanks
-Vincent

> {{velocity}}
> #set($sql = ("where doc.fullName not in (select doc.fullName from
> XWikiDocument doc, BaseObject as tagObj, DBStringListProperty as tags join
> tags.list tag where doc.fullName = tagObj.name and tagObj.className =
> 'XWiki.TagClass' and tagObj.id = tags.id.id and tags.id.name='tags' and tag
> <> '')order by doc.space asc ") )
> #set ($list = $xwiki.searchDocuments($sql))
> #foreach($item in $xwiki.searchDocuments($sql))
> #set ($recentDoc = $xwiki.getDocument($item).getTranslatedDocument())
>   ## We use HTML here because we don't have a tool to escape wiki syntax in
> document title.
> |$recentDoc.getSpace()|{{html}} $escapetool.xml($recentDoc.plainTitle)
> <$recentDoc.getURL()>  {{/html}}
> #end
> {{/velocity}}
>
> Thank You!

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

RES: all pages without any "Tags"

Danilo Amaral de Oliveira
Hello People,

Just to notify, I have tried this extension but it is not working. I don’t know why but the consulting results still showing documents that have tags.

I am using the XWiki 5.2.2
Danilo



Grupo Energisa
Danilo A. Oliveira
Analista Suporte Aplicacao TI - DETI
e-mail: [hidden email] | tel: (32) 3429-6342

Esta mensagem contém informação confidencial. Se você a recebeu por engano, não divulgue ou copie seu conteúdo. Por favor, avise ao remetente imediatamente e apague-a do computador.
Privileged and confidential. If this message has been received by mistake, do not disclose or copy its contents. Please notify sender and delete immediately.


-----Mensagem original-----
De: [hidden email] [mailto:[hidden email]] Em nome de Vincent Massol
Enviada em: terça-feira, 3 de setembro de 2013 12:32
Para: XWiki Users
Assunto: Re: [xwiki-users] all pages without any "Tags"

Hi,

On Sep 3, 2013, at 5:26 PM, "Volker.Lapczynski" <[hidden email]> wrote:

> This is working on XWiki Enterprise 5.2-milestone-1:

Cool.

Maybe you could contribute it as a snippet on extensions.xwiki.org?

Thanks
-Vincent

> {{velocity}}
> #set($sql = ("where doc.fullName not in (select doc.fullName from
> XWikiDocument doc, BaseObject as tagObj, DBStringListProperty as tags
> join tags.list tag where doc.fullName = tagObj.name and
> tagObj.className = 'XWiki.TagClass' and tagObj.id = tags.id.id and
> tags.id.name='tags' and tag <> '')order by doc.space asc ") ) #set
> ($list = $xwiki.searchDocuments($sql)) #foreach($item in
> $xwiki.searchDocuments($sql)) #set ($recentDoc =
> $xwiki.getDocument($item).getTranslatedDocument())
>   ## We use HTML here because we don't have a tool to escape wiki
> syntax in document title.
> |$recentDoc.getSpace()|{{html}} $escapetool.xml($recentDoc.plainTitle)
> <$recentDoc.getURL()>  {{/html}}
> #end
> {{/velocity}}
>
> Thank You!

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: RES: all pages without any "Tags"

Legeinfo
Hello Danilo!
Thank you for your feedback.
I installed the extension again, both with "clip and paste" and installing the xar. The results showing only documents without having tags. Se:http://www.radiology.no/xwiki/bin/view/RadWiki/PagesWithoutTags

I am using the XWiki Enterprise 5.2.1
Volker