Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I make my favorite spaces appear alphabetically on my dashboard

Alice April 4, 2016

I just upgraded to Confluence 5.9.7. I like how I can see my favorite spaces on my dashboard, but don't like how they aren't organized alphabetically. Anyone know how? 

2 answers

0 votes
Tim H_
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.
April 22, 2016

I have the same question for Cloud.

0 votes
Stephen Deutsch
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.
April 5, 2016

You could insert the following in your custom HTML:

<script>
//Sort My Spaces on the dashboard in alphabetical order
AJS.toInit(function() {
    if ($("body").hasClass("dashboard")) {
        $( document ).ajaxComplete(function( event, xhr, settings ) {
			if ( settings.url.indexOf("search?cql") > 0 ) {
				var mySpaces = $("#sidebar-spaces > div > ul > li").detach();
				mySpaces.sort(function (a, b) {
					return $(a).find('.aui-nav-item-label').text() > $(b).find('.aui-nav-item-label').text() ? 1 : -1;
				});
				$("#sidebar-spaces > div > ul").append(mySpaces);
			}
		});
    }
});
</script>
Alice April 5, 2016

Thanks so much, Stephen!

George Lewe (LSY)
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.
April 8, 2016

That script does not have any effect in my environment. I tried all three custom HTML sections available. Any other idea?

JONATHAN BOHLMANN November 4, 2016

Where do we put this code?

Stephen Deutsch
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.
November 4, 2016

To include JavaScript inside Custom HTML, go to Confluence Admin > Custom HTML and insert the code in the "At end of the HEAD" textbox.

https://confluence.atlassian.com/confkb/how-to-use-javascript-in-confluence-313458839.html

JONATHAN BOHLMANN November 4, 2016

Code didn't work for us either. on Confluence 5.10.0

Stephen Deutsch
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.
November 4, 2016

I see now that it was loading the spaces dynamically. The updated code should work (but it will only work for 5.10 and below, it won't work for 6.0).

JONATHAN BOHLMANN November 4, 2016

That worked great! thank you.

Deleted user March 4, 2019

is there an update which works Confluence 6.10?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events