Is there a way to display the document count of a folder, inline in the list view?

I am looking for a way to display the content count of files in a folder. I am surprised that this feature is not standard. I see that there was an addon that is now deprecated, called Nuxeo Document Count. Also, I see that Quota is used with JSF but it is also deprecated. It doesn’t seem like a great solution. I would like to see the file count of a folder listed under the 'Size' column.

0 votes

1 answers

1084 views

ANSWER

This is the code that I came up with. I put this in the Document/folder/view and it is displaying a zero value for each item in the list view. Any suggestions, on how to get the correct count, would be helpful.

     <nuxeo-data-table-column 
        name="File Count"
        field="field:provider.resultsCount"
        sort-by="field:provider/resultsCount" 
        flex="15"
        currentPageIndex=0 
        offset=0 
        pageSize=40 
        ecm_uid="document.getElementById("uid")"
        ecm_trashed=false
      >
      <template>
        [[document.contextParameters.publications.resultsCount]]
      </template>>
        </nuxeo-data-table-column>
02/26/2021



Hello,

The number of document is indicated on top of the document listing (see attachment).

Regards

0 votes



Thank you for your response. Yes, I am aware of the count at the top. What I am looking for is an inline file count in the list view. Most file systems under the file 'Size' column list the number of files within the folder or the size of the document. I am interested in seeing the file count of a folder before I open the folder.
02/23/2021

There is a resultsCount value return by the API call when listing the folder content:

  • Query: Request URL: https://nightly.nuxeo.com/nuxeo/api/v1/search/pp/advanced_document_content/execute?currentPageIndex=0&offset=0&pageSize=40&ecm_parentId=e884b324-c17a-459b-81f5-4d7734f155b3&ecm_trashed=false
  • Response: {"entity-type":"documents","isPaginable":true,"resultsCount":5,"pageSize":40,"maxPageSize":1000,"resultsCountLimit":10000,"currentPageSize":5,"currentPageIndex":0,"currentPageOffset":0,"numberOfPages":1,"isPreviousPageAvailable":false,"isNextPageAvailable":false,"isLastPageAvailable":false,"isSortable":true,"hasError":false,"errorMessage":null,"totalSize":5,"pageIndex":0,.....
02/24/2021