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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,044
Community Members
 
Community Events
184
Community Groups

In using many panels on a single page is their a way to have an auto sort on the panel title?

I'm listing out an excel by server into a single page that shows some data..  I have over 30 servers so each server is labeled under its own panel with title.  How do you auto sort Panels?   

1 comment

Thiago Masutti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 27, 2021

Hi @Ryan Ballas 
I hope you are safe and well.

Confluence doesn't have such a feature out-of-the-box.
However, Confluence gives us many ways to customize appearance on pages.

If your Confluence administrator enabled the HTML macro, you may be able to implement something on JavaScript to sort the Panel macros in your page.

Let's say you have your content organized in page sections and the panel macros are all in the same section, similar to the image below.

test-page.png

 

Then you can add an HTML macro with the following code.

<button id="sortPanelButton">Sort panels</button>
<script type="text/javascript">
$('#sortPanelButton').on('click', function () {
AJS.$('div.panel.conf-macro.output-block').sort(function(a, b) {
if (a.childNodes[0].textContent < b.childNodes[0].textContent) {
return -1;
} else {
return 1;
}
}).appendTo($('#sortPanelButton').parent());
});
</script>

test-page-2.png

 

When viewing the page, the user has the option to click on a button that will sort all the panels in the page, which is applied just for the current view.
Note that the JavaScript code is built on the way that it expects the button and the panels to be on the same layout section.

While this doesn't sort the panels while you are editing, it will help on displaying the information.
Let us know if that helps on your goal.

Kind regards,
Thiago Masutti

Like Ryan Ballas likes this

@Thiago Masutti  Thanks for your comments.  

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events