Some Episerver websites has many categories configured. For Editors it’s easier when categories are sorted alphabetically. It’s possible to change category order in admin mode, but this requires to click “up” or “down” button few times. For this scenario you can use small code snippet with a plugin for sorting categories. It will add “Sort all” button on the categories view that sorts all categories alphabetically.
Plugin for sorting categories in admin mode

There is no buil-in way to add more buttons to categories list page, but we can use veeeeery old .NET feature- control adapters. Originally it was used for styling :), but here I will use it to modify existing controls without access to the source code.

To add new control adapter we have to create App_browsers folder in web application project and add Default.browser file.
Control adapter
The Default.browser is an XML with configuration of a source control that should be modified (System.Web.UI.WebControls.ContentPlaceHolder) and an adapter class (CategoriesContentPlaceholderAdapter).

The adapter class inherits from ControlAdapter and it’s responsible for adding “Sort all” after “Add” button.

I moved sorting logic to a separate class.

After compiling the code “Sort all” button should appear on the Categories view.