How can you sort in OpenCMS the files in one folder alphabetically?
I use the allInFolder
collector, and I get all the files, but they are not sorted.
How can you sort in OpenCMS the files in one folder alphabetically?
I use the allInFolder
collector, and I get all the files, but they are not sorted.
You can use the allInFolder
collector, and then iterate with I_CmsXmlContentContainer.hasMoreContent()
. Inside the loop, you can add the element to a List of String, and then use Collections.sort to sort them.