The space directory is a plugin called Confluence Space Directory with a key called com.atlassian.confluence.plugins.confluence-space-directory. The only thing, can do is overwrting this plugin, this will probably be a must do for each update you are doing...
Take a look at the network on your browser developer tools...
The directory listing is populated by REST/AJAX using the following REST API:
//pageSize: +AJS.params.pageSize, pageSize: 10000000000000, // a big number
Edit: I've tried repackaging the plugin, with the pageSize replaced. It doesn't seem to work.
Write a Servlet Filter
Another approach would be to write a servlet filter that acts on the URL /rest/spacedirectory/1/search/* and replaces the pageSize parameter with a larger number before redirecting. This would have the advantage of not being quite such a hack and could handle upgrades to the base installation much more effectively.
Thinking a little bit more about it, you will need to modify the page before the init event is fired...
You could create a new page that utilizes the spaces macro.
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG