How-To Guide¶
This guide provides step-by-step workflows for the most common tasks with Category Sorter.
How the Plugin Works¶
- You select a category on the plugin page.
- The plugin orders its direct subcategories alphanumerically (recursively if requested).
- The new order is immediately visible in the category tree under Catalogues → Categories.
Common Workflows¶
How to: Sort a category's subcategories¶
Goal: Put a category's direct subcategories into alphanumeric order.
Steps:
- Open the plugin page
- Navigate to:
Settings → Plugins → Category Sorter - Pick a category
- In the Category field, expand the tree and click the category you want.
- Start sorting
- Click Sort subcategories.
Result: The chosen category's direct subcategories are in alphanumeric order (A–Z). A message reports how many categories were reordered.
How to: Sort the entire subtree (recursive)¶
Goal: Sort not just the direct children, but every level below them.
Steps:
- Open the plugin page and pick a category (see above).
- Enable Sort recursively.
- Click Sort subcategories.
Result: The selected category and every level beneath it are sorted down to the deepest level.
How to: Sort multiple categories at once¶
Prerequisite: The multiselect In-App Purchase (multiselect) is active.
Steps:
- Open the plugin page.
- In the category tree, select several categories via their checkboxes.
- Optionally enable Sort recursively.
- Click Sort subcategories.
Result: The subcategories of all selected categories are sorted.
If multiselect is not unlocked, click Unlock multiselect to start the In-App Purchase.
How to: Set up automatic sorting¶
Prerequisite: The automatic sorting In-App Purchase (scheduled-sort) is active.
Steps:
- Open the plugin page and select the categories to sort.
- In the Automatic sorting card, set the Run interval (seconds) (e.g.
86400for once per day). - Click Save in the top right.
Result: The saved selection is sorted automatically at the defined interval. Interval changes take effect immediately on save.
Important: Automatic sorting only runs while a message queue worker is active (admin
worker or bin/console messenger:consume).
Quick Reference¶
| Task | Key steps | Requires |
|---|---|---|
| Sort one category | Pick category → Sort subcategories | – |
| Sort recursively | Enable Sort recursively → sort | – |
| Multiple categories | Select several in the tree → sort | multiselect |
| Sort automatically | Selection + interval → Save | scheduled-sort |
Best Practices¶
- Check names before the first run: Sorting follows the category name exactly (natural A–Z order), so verify the names first.
- Use recursive deliberately: On large trees, recursive mode reorders a great many categories — apply it consciously.
What to Avoid¶
- ❌ Expecting automatic sorting without a running worker — without a worker the scheduled task will not execute.
- ❌ Assuming multiple categories are sorted without the
multiselectpurchase — without it, only the first category is taken into account.