How to make SOLID list of spaces instead some lists of spaces ?

hi) help to solve the problem...How to make SOLID list of spaces instead some lists of spaces ?

4 answers

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...

0 votes
David Simpson Community Champion Feb 09, 2014

Take a look at the network on your browser developer tools...

The directory listing is populated by REST/AJAX using the following REST API:


Looking at the Javascript in the plugin, you could break open the jar file and increase the size of the pageSize variable.

Check line 99 here:

//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.


To point up Davids idea, you can write a Javascript like

if (AJS.$('#space-directory-wrapper')) { AJS.params.pageSize = 1000000000000000;}

and set its context to dashboard, that would do it

David Simpson Community Champion Feb 10, 2014

That's not going to work. Yoiu somehow need to change AJS.params.pageSize or the value of the content attribute in <meta name="ajs-page-size" ...> before the rest of the JavaScript loads.

Thinking a little bit more about it, you will need to modify the page before the init event is fired...

Changing the meta-tag will be more appropriate then doing the JS, but take care, in earlier versions of confluence this is not a meta tag but a hidden input field. But after all the solution in Javascript to fix this will not be "nice" and I'm not sure, if it will work properly. This might be some work, so I would consider the first option of modifiing the plugin.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,380 views 101 8
Join discussion

Atlassian User Groups

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!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you