Forums

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

How to get a reverse sort order in the page tree?

Vigfus Andersson
Contributor
September 19, 2018

Hi,

On the actual page, Retro & Backlogprio, I've tested the macros Children UI and Page tree to reverse the sort order (descending) for our pages with meetings. The problem is that it will only affect the actual page (see pic below) and the sort order in the page tree is till ascending.

I don't want to sort the whole page tree in descending order - only the specific displays under each sub page in the page tree (where you see the bottom pointing arrows to the left) so they match the sort order on the actual page (with the top pointing arrow to the right). Is there any way to do that?

Best Regards,
Vigfus

pageTreeSelectiveSort.PNG

3 answers

2 votes
Shane Cyr July 13, 2022

I'd like to +10 this request for a reverse sort option. This seems like a challenging thing to consider, I've drafted this comment like four times after hitting corners where I realize it's complex to manage (and presumably to develop). One suggestion might be to let us configure a setting on a page that tells the tree to use a particular sort for its children in the tree. So there wouldn't need to be ultra-powerful, overly complex tree configuration, it would instead adopt its instructions from the pages it links to.

Thanks!

1 vote
Shawn C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 20, 2018

Hi Vigfus, 

Currently, the Sidebar Page Tree only has the sorting options of Manual or A-Z and there is a Feature Request to bring in a 'reverse' Z-A Sort option to it: https://jira.atlassian.com/browse/CONFSERVER-31358

As a possible workaround, you could add the following CSS to the Space Style Sheet to reverse the Sidebar Page Tree, however it'll reverse everything in the tree:

.plugin_pagetree_children_list{
display:flex;
flex-direction:column-reverse;
}

Looking at the Community Post where I found this CSS on, the creator does mention a way to specify sorting certain sections of the Page Tree by pulling the IDs of Parent Pages; it might be something to try if you only need to sort the Child pages of "Retro" and "Ovriga". 

Cheers, 
Shawn

Vigfus Andersson
Contributor
September 21, 2018

Thanks for the informative reply Shawn!

Best Regards,
Vigfus

0 votes
Matthew Beda
Contributor
June 6, 2019

This uses the Refined Theme Plugin Page Tree but should be able to modify it for the Stock Page Tree Macro.

 

User Macro to Specify individual Menu Item based on Title Attribute;

 

## @param MenuItemText:title=Menu item Text to Reverse Sort|type=string|required=true|desc=Exact Match needed. Is case Sensitive.

<style>
.reversesort + .rw_pagetree_list {
display:flex;
flex-direction:column-reverse;
}
</style>
<script>
AJS.toInit(function() {
ul = AJS.$("a[title='$paramMenuItemText']").parent().parent().addClass('reversesort');
AJS.$('.rw_page_tree_wrapper').ajaxComplete(function() {
ul = AJS.$("a[title='$paramMenuItemText']").parent().parent().addClass('reversesort');
});
});
</script>

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events