How to sort Servicerocket Scaffolding content-options?
Asked by Mike Pearson:

I'm using the Servicerocket Scaffolding *"content-options"* macro within a *"list-data"* so that the listed options are the children of a given page.

I'd like to be able to sort these in descending order.

I've tried to put a *"text-sort"* macro inside the *"content-options"* body, but to no avail.

Is it possible to sort the content-options?


Answers:
author: Samuel Gatica
body: Hi Mike,

By default Content option Macro will sort them alphabetically, for the moment is the only way.

Text Sort is a macro only available for Reporting plugin.

Regards,

Sam

comments: author: Mike Pearson
body: Thank you for the prompt reply [@Samuel Gatica](/t5/user/viewprofilepage/user-id/753028).

So there is no way (or workaround) to be able to populate a list-data dynamically with sorted options?

I was thinking something like creating a sorted report, and then somehow injecting into the list-data or content-options body. ...but if this is a fruitless avenue please let me know so I'm not wasting my time experimenting.

----

Somewhat related: what about filtering? Is it possible to populate a list-data options with child pages that meet a certain criteria? For example all child pages where data:Status = "Closed"?


author: Mike Pearson
body: **NOTE:**

This *WAS* possible back when you could use wiki-markup. For example the following worked:

{list-data:MyList}  
{content-options:parent=SR:Records}  
{text-sort:page:title\|order=descending}  
{content-options}  
{list-data}

I'm surprised that this functionality was removed with the deprecation of the wiki-markup, as it is incredibly useful!


author: Mike Pearson
body: I've confirmed that sorting AND filtering of content-options is possible in previous versions of Scaffolding \& Reporting (v3.4.2), using wiki markup.

However, now, even using Bob Swift's [Wiki Markup for Confluence](https://marketplace.atlassian.com/apps/1210757/wiki-markup-for-confluence?hosting=server&tab=overview) plugin to enter the exact same wiki markup that worked previously, it appears that you can no longer sort nor filter the content-options.

Why was this functionality removed? It is ++SO++ useful!

Is there somewhere I can submit a feature request to have this functionality reinstated?


author: Mike Pearson
body: I have corresponded with ServiceRocket via email, and am told the reason sorting/filtering of content-options was possible in previous versions, and not in current version is due to the removal of Randombits (RB) libraries dependencies.

So, at the moment, it is confirmed that this functionality is not possible.

ServiceRocket, however, has raised an improvement suggestion, so hopefully we'll see this handy feature reinstated in a future update... In the meantime, I'll mark this thread as answered.


author: Abdullah AlThawr
body: Hello [@Mike Pearson](/t5/user/viewprofilepage/user-id/123096). Just to let you know that latest scaffolding release 8.19.0 has implemented a sort feature for the content-options macro. You can adjust the sorting using the macro params (see photo). Please let us know if you find any issue.

![36329555_340660979800641_1025813433540411392_n.png](https://community.atlassian.com/t5/image/serverpage/image-id/27448i51472C1E1FDDC394/image-size/large?v=v2&px=999 "36329555_340660979800641_1025813433540411392_n.png")


Tags: confluence-server

content

list

option

scaffolding

server

servicerocket