diff --git a/docs/control-panel/categories.md b/docs/control-panel/categories.md index 9f7977445..afd202e9a 100644 --- a/docs/control-panel/categories.md +++ b/docs/control-panel/categories.md @@ -19,6 +19,12 @@ Category groups are _collections_ of categories that can be assigned to channels ![Category Manager Control Panel Page](_images/cp-category-manager.png) +## Reorder Categories + +On the category listing screen, you can drag and drop categories to change order or nesting within the selected category group. + +The category listing is saved as soon as you are done reordering, ExpressionEngine validates the full reorder payload before writing changes. If the payload is incomplete, no partial reorder is saved. + ## Create/Edit Category **Control Panel Location: `Content > Categories > New/Edit Category`** diff --git a/docs/development/extension-hooks/cp/admin-content.md b/docs/development/extension-hooks/cp/admin-content.md index 0c89bce1b..e61a60d02 100755 --- a/docs/development/extension-hooks/cp/admin-content.md +++ b/docs/development/extension-hooks/cp/admin-content.md @@ -42,6 +42,20 @@ How it's called: ee()->extensions->call('category_save', $cat_id, $category_data); +## `category_reorder_end($changed_rows, $group_id)` + +| Parameter | Type | Description | +| --------------- | ------- | --------------------------------------------------------------------------- | +| \$changed_rows | `Array` | Changed category rows saved during reorder. Each row includes `cat_id`, `parent_id`, and `cat_order`. | +| \$group_id | `Int` | Category group ID being reordered | +| Returns | `Void` | | + +This hook is executed after category reordering is successfully saved in the Control Panel. It only runs after the reorder transaction completes and receives only the rows that changed. + +How it's called: + + ee()->extensions->call('category_reorder_end', $changed_rows, (int) $group_id); + ## `foreign_character_conversion_array` See Content_publish's `foreign_character_conversion_array`.