Need to order content by label results
Asked by Jason Green:

Hi All,

Confluence newbie here. I am using the Confluence Content-by-Label macro and it only allows me to sort by Title/Creation/Modified. I desperately need manual control over this sort-by function. I need to order my installation Heading pages on my dashboard in a specific, logical order. I like the dynamic nature of the Content-by-Label macro. How can I have both my own custom sorting ability and the dynamic feature? Is the zero-width space in unicode character a possible work-around?

Thx,

J


Answers:
author: Nancy Bonanno
body: [@Jason Green](/t5/user/viewprofilepage/user-id/1849658) Did the zero-space workaround work for you? I need to list instruction pages in a specific order and I have the same problem as you.


author: Shannon S
body: Hi Jason,

It's not possible to manually sort. This was requested in the past, but we do not intend to include this in the near future:

* [CONFSERVER-33330](https://jira.atlassian.com/browse/CONFSERVER-33330) Content By Label / Sort By - Manual Sort option.

In my search, I was able to find a 3rd party add-on that could possibly help you with this:

* [Include Content By Label for Confluence](https://marketplace.atlassian.com/apps/1210755/include-content-by-label-for-confluence?hosting=server&tab=overview)

It's not supported by Atlassian, but it would still be worth installing and seeing if it can help you accomplish what you need.

As for the zero-space workaround you mentioned, I haven't tested this myself, but you can certainly try it and let us know how it goes.

Regards,

Shannon

comments: author: Arindam Banerjee
body: Hi Shannon,

I wonder if we can get the contents (Content by label) ordered by 'Position' as it is available in 'Page Tree' macro.

Thanks,

Arindam


author: Shannon S
body: Hello Arindam,

You can sort [Content by Label](https://confluence.atlassian.com/doc/content-by-label-macro-145566.html) in the following ways:
> Sort the list by title, the date it was created, or the date it was last modified. If you don't select an option, CQL default ordering by relevancy is used.

Position is not a possible sorting method.

I hope that's clear! Let me know if you have any additional questions.

Regards,

Shannon


author: Nancy Bonanno
body: How is "relevancy" decided by the macro?


author: Shannon S
body: Hi Nancy,

Thank you for following-up here; great question!

Confluence search results ranking (using CQL) uses a complex formula, which can change depending on the Confluence version. There's an official explanation here:

* [How do I understand the ranking of Confluence's Search Results?](https://confluence.atlassian.com/confkb/how-do-i-understand-the-ranking-of-confluence-s-search-results-785614686.html)

The goal of this document is not to explain the search algorithm (as this changes between releases) but rather to help explain the overarching principals in Confluence Search Results.

Thus, relevancy isn't based on one specific set of factors. Rather, a complex algorithm which determines a specific weight for that document, as described in the above article.

I'm sorry that it's not such a simple answer, but I wanted to provide some insight on how that is determined.

Take care,

Shannon


Tags: confluence-server

content

label

macro

server

sort