I did it!

{{velocity}}
#set($class="XWiki.XWikiComments")
#set($name=$doc.fullName)
#set($xwlquery="select obj.comment from Document doc, doc.object($class) as
obj where doc.fullName='$doc.fullName' order by obj.date desc")
#set($list=$services.query.xwql($xwlquery).setLimit(1).execute())
#foreach($item in $list)
  $item
#end
{{/velocity}}

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/get-last-comment-of-some-document-tp7057606p7057668.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to