Sort glossary items by category in backend