Sort Table in user macro

Hi all,

we have a user macro that iterates the groups and shows the members of the group. Is there a chance that the table shows the results in a sorted order? The tables only consist of 2 columns group and users and we would like to sort the usernames.

Another point is, can we set the width of the columns?

Thanks for any advice.


3 answers

Hi Bruce,

A colleague of mine wrote this user macro which enables column sorting on tables within a wiki page. It's relies on jQuery to do this, but that's included with Confluence anyway.

You could simply register the macro and add it in the page where your table is, or extract the code you need and add it into your user macro so that the sort is applied automatically.



Confluence 4.3 has basic sorting. Table-plus macro has more advanced sorting and customization of column attributes. Table-plus also has a sortColumn parameter to auto sort on first display.

Thanks for your input. I must add we are running Confluence 4.3.2 and have the basic sorting but creating the table always starts with an unsorted table and I would like to have it sorted in the beginning.

Is there any way to achieve this?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,925 views 27 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you