cancel
Showing results for 
Search instead for 
Did you mean: 

Navigation tree size

Florent_Guillau
World-Class Innovator
World-Class Innovator

How do I change the left-hand navigation tree to display more than 50 children for a folder?

1 ACCEPTED ANSWER

Florent_Guillau
World-Class Innovator
World-Class Innovator

In Nuxeo 5.4.2 and beyond this can be done by overriding the tree_children PageProvider and changing the pageSize:

 <require>org.nuxeo.ecm.webapp.pageproviders.contrib</require>

 <extension target="org.nuxeo.ecm.platform.query.api.PageProviderService"
    point="providers">
    <coreQueryPageProvider name="tree_children">
      <pattern>
        SELECT * FROM Document WHERE ecm:parentId = ? AND ecm:isProxy = 0 AND
        ecm:mixinType = 'Folderish' AND ecm:mixinType != 'HiddenInNavigation'
        AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState !=
        'deleted'
      </pattern>
      <sort column="dc:title" ascending="true" />
      <pageSize>50</pageSize>
    </coreQueryPageProvider>
  </extension>

In Nuxeo 5.4.1 and earlier you had to override the TREE_CHILDREN QueryModel and provide a new max:

  <require>org.nuxeo.ecm.webapp.querymodel.DefaultQueryModels</require>

  <extension target="org.nuxeo.ecm.core.search.api.client.querymodel.QueryModelService"
    point="model">
    <queryModel name="TREE_CHILDREN">
      <pattern>
        SELECT * FROM Document WHERE ecm:parentId = ? AND ecm:isProxy = 0 AND
        ecm:mixinType = 'Folderish' AND ecm:mixinType != 'HiddenInNavigation'
        AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState !=
        'deleted'
      </pattern>
      <sortable defaultSortAscending="true"
        defaultSortColumn="dc:title" value="true" />
      <max>50</max>
    </queryModel>
  </extension>

View answer in original post

2 REPLIES 2

Florent_Guillau
World-Class Innovator
World-Class Innovator

In Nuxeo 5.4.2 and beyond this can be done by overriding the tree_children PageProvider and changing the pageSize:

 <require>org.nuxeo.ecm.webapp.pageproviders.contrib</require>

 <extension target="org.nuxeo.ecm.platform.query.api.PageProviderService"
    point="providers">
    <coreQueryPageProvider name="tree_children">
      <pattern>
        SELECT * FROM Document WHERE ecm:parentId = ? AND ecm:isProxy = 0 AND
        ecm:mixinType = 'Folderish' AND ecm:mixinType != 'HiddenInNavigation'
        AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState !=
        'deleted'
      </pattern>
      <sort column="dc:title" ascending="true" />
      <pageSize>50</pageSize>
    </coreQueryPageProvider>
  </extension>

In Nuxeo 5.4.1 and earlier you had to override the TREE_CHILDREN QueryModel and provide a new max:

  <require>org.nuxeo.ecm.webapp.querymodel.DefaultQueryModels</require>

  <extension target="org.nuxeo.ecm.core.search.api.client.querymodel.QueryModelService"
    point="model">
    <queryModel name="TREE_CHILDREN">
      <pattern>
        SELECT * FROM Document WHERE ecm:parentId = ? AND ecm:isProxy = 0 AND
        ecm:mixinType = 'Folderish' AND ecm:mixinType != 'HiddenInNavigation'
        AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState !=
        'deleted'
      </pattern>
      <sortable defaultSortAscending="true"
        defaultSortColumn="dc:title" value="true" />
      <max>50</max>
    </queryModel>
  </extension>

Moreover, note that since Nuxeo 5.4.2 you can also contribute a maxPageSize in a coreQueryPageProvider.

Getting started

Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.