> For the complete documentation index, see [llms.txt](https://docs.momocode.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.momocode.de/en/shopware-6/admin-category-tree-memory-en/1.-description.md).

# 1. Description

Shops with many categories know the problem: the Shopware admin category tree loads fully expanded by default — hundreds of entries at once, hard to navigate, endless scrolling. The **Admin Category Tree Memory** plugin solves this by starting the tree collapsed and remembering what you last had open.

![Collapsed category tree with Catalogue #1 and Catalogue #2](/files/ueoi87TVYeNR9AxhD90D)

## Features

### Start collapsed — configurable depth

Set your preferred starting depth in the plugin configuration:

* **Depth 0** — only root categories visible (default)
* **Depth 1** — first level expanded (native Shopware behaviour)
* **Depth 2** — first two levels expanded
* **Depth 99** — fully expanded (can lead to performance issues if there are many categories)

### Automatic state persistence

Every time you expand or collapse a branch, the plugin saves your personal state in the browser (localStorage). The next time you open the category management, you see exactly what you had open before — no manual re-expanding needed.

The state is device-specific: each browser and device maintains its own independent state.

### "Collapse all" button

Click the **Collapse all** button in the category tree header to instantly collapse all open branches and save that state. A quick way to return to a clean overview at any time.

### Auto-expand to the active category

When you navigate directly to a category (via URL or search), the plugin automatically expands the path to that category and scrolls it into view — so you always know where you are in the tree.

![Auto-expanded path to an active category](/files/RhlNQSYEL0GDWB7ZEMct)

### Consistent across the admin

The plugin works in all areas of the Shopware admin where the category tree appears:

* **Catalogues → Categories** — the main category management
* **Product editing → Categories** — when assigning categories to products
* **Settings → Sales Channels → \[Channel] → General** — when selecting the navigation entry category

![Category dropdown in product assignment with collapsed categories and Collapse all button](/files/BkmcEHgOclKrNhPk2h1u)

## Technical Details

* Compatible with Shopware 6.6 (version 1.x) and Shopware 6.7 (version 2.x)
* Frontend-only plugin — no changes to backend, database, or API
* State is stored locally in the browser (localStorage) — no server communication
* No impact on shop performance or the storefront
* PHP 8.2+ required
