Can we restrict number of children nodes for while constructing tree node?

while select (expand) a node, it is constructing all child nodes tree.
So, is there any way that we can set limit to load no.of child nodes and add pagination (navigation) to load next set of children nodes?

Hello @Bhargava, are you referring to the CMS console (/cms/console) or somewhere else? What issue are you trying to solve?

Hi @david.bailey .
need for /cms only.

Hello @Bhargava this is not something that can be configured out of the box. If you really need this you would have to extend or fork org.hippoecm.frontend.plugins.cms.browse.tree.FolderTreePlugin, and then adapt the configuration under /hippo:configuration/hippo:frontend/cms/cms-tree-views/documents/documentsBrowser.

However it is not good practice to have so many sub-folders in a folder. I would recommend to create sub-folders for “a”, “b”, “c” etc (or some other approach like date-based) and adapt your code accordingly. We recommend to have at most 100 items in a folder.

Thank you @david.bailey …!

Tried with above solution, and able to achieve what I want.

But, yes, will follow your recommendation (have at most 100 items in a folder) also.

1 Like