Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Vladimir Z
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 9, 2014

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

4 answers

0 votes
Phillip Ponzer [Cprime]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2014
0 votes
Steve Gerstner [bridgingIT]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2014

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 at David Simpson Apps
Atlassian Partner
February 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.

Steve Gerstner [bridgingIT]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 10, 2014

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.

0 votes
David at David Simpson Apps
Atlassian Partner
February 9, 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:

/rest/spacedirectory/1/search?query=&type=global&status=current&pageSize=24&startIndex=72&_=1392028346532

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: https://gist.github.com/dvdsmpsn/f7000489c5fac689648d#file-space-directory-js-L99

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

 
0 votes
Steve Gerstner [bridgingIT]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2014

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

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, confluence, marketing templates, confluence templates, marketing project management, content strategy, campaign planning, marketing collaboration, confluence for marketers, atlassian learning, marketing workflows, confluence best practices

5 must-use templates for Marketing teams (from a Confluence Marketer!) 👩🏻‍🎨

Who doesn’t love a good template? We sure do! Check out our top template picks for Marketing teams who want to streamline their processes, enhance collaboration, and take their marketing to new heights.

Read more 📚
AUG Leaders

Atlassian Community Events