Reputation: 11
Is there a sort option in kentico where you can sort list according to alphabets ?
Like list.split(",").Sort ?
Upvotes: 0
Views: 283
Reputation: 1869
Yes, you can sort macro results. As an example, if you wanted to sort the list of users in your Kentico site by their username, you could use:
GlobalObjects.Users.OrderBy("UserName")
If you want to reverse the order, then you can use:
GlobalObjects.Users.OrderBy("UserName DESC")
If you want to be able to quickly test, you can use the macro console to test your macro output. The console can be found ins the System application under Macros > Console. The horrifyingly fast GIF below shows you where to lookL
Upvotes: 1