List All Editors Snippet
How to list all the people that edited a document. Simple and efficient query, but requires programming rights.#set($targetDoc = $xwiki.getDocument("Main.WebHome"))
## Or any other document. Or just use $doc, the current doc.
#set($editors = $xwiki.search(
"select distinct rni.author from XWikiRCSNodeInfo rni where rni.id.docId = $targetDoc.id"))
#foreach($editor in $editors)
* $editor
#end## This works with the current document, $doc, but can be modified as above. #set($editors = $xwiki.searchDocuments( ", XWikiRCSNodeInfo rni where rni.id.docId = $doc.id and rni.author = doc.fullName")) #foreach($editor in $editors) ## Write a link and a proper name, not just the document name. Can also be used in snippet 1. * $xwiki.getUserName($editor) #end
Version 1.3 last modified by Sergiu on 13/03/2008 at 23:22
Document data
Attachments:
No attachments for this document
Comments: 0