Problem making a Comments table

Hello all.
I have the following problem:
I’m new in XWiki and i want to make a table like Xwiki.XWikiComments page, but i don’t know how to do this.

  1. I have to use Documents Macro or Livetable Macro?
  2. And where i can find a how to for calling the comments or/and comments count in a column?
  • I have already found informations for authors, attachments, tags, etc. but not for comments.

Hello @Sarantis,

Please describe further your usecase if you wish to have a more precise answer :slight_smile:
Also, which XWiki version are you running?

I’ve pasted below the Live Data macro declaration to list the comments. For me details, please refer to the Live Data macro documentation.

{{liveData 
  id="classEntries"
  properties="doc.title,doc.location,doc.date,doc.author,doc.objectCount,_actions"
  source="liveTable"
  sourceParameters="className=XWiki.XWikiComments&translationPrefix=platform.index.&queryFilters=unique"
}}
{
  "meta": {
    "propertyDescriptors": [
      {
        "id": "doc.title",
        "editable": false
      },
      {
        "id": "doc.objectCount",
        "editable": false,
        "filterable": false,
        "sortable": false
      }
    ]
  }
}
{{/liveData}}

Thank you for your reply, that almost solve my problem. I use XWiki 13.8 .
I have missed out the Live Data Macro and also the

translationPrefix=platform.index.

I try to make two tables:

  1. like the XWiki.XWikiComments with comment count
  2. With all comments of my wiki, sorting by date, with the text of comments on one column of the table(I have also try this but i get only the first comment per page, but “n” times where “n” the number of comments per page)
    comments_table

comments_table1

I believe the example proposed above matches the requirements for your first table, see the doc.objectCount property contains the number of comments of each page.
For you second table, you simple have to:

  • remove the doc.objectCount property
  • remove the source=unique source parameter (which allows to group the object per page and to count them)
  • add a comment property

See the result below:

{{liveData
  id="classEntries"
  properties="doc.title,doc.location,doc.date,doc.author,comment,_actions"
  source="liveTable"
  sourceParameters="className=XWiki.XWikiComments&translationPrefix=platform.index."
}}
{
  "meta": {
    "propertyDescriptors": [
      {
        "id": "doc.title",
        "editable": false
      }
    ]
  }
}
{{/liveData}}