plan2net / backend-category-hierarchy
Show category hierarchy information in list view
Package info
github.com/plan2net/backend-category-hierarchy
Type:typo3-cms-extension
pkg:composer/plan2net/backend-category-hierarchy
Requires
- php: ^8.2
- typo3/cms-backend: ^13.4 || ^14.0
- typo3/cms-core: ^13.4 || ^14.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^11.5
- typo3/testing-framework: ^9.3 || ^10.0
- vimeo/psalm: ^6.0
Suggests
This package is auto-updated.
Last update: 2026-05-17 08:02:24 UTC
README
Show the full parent path of every sys_category record in TYPO3 backend lists.
The hierarchy is also shown in the global backend search:
Why
TYPO3's backend lists only show the leaf title of a category. Once an editor has multiple branches with categories named News, Frontend, or Events, those rows become indistinguishable.
This extension augments the displayed title with its full ancestor chain in list views and reference dropdowns. Edit forms and tree views are left untouched.
Installation
composer require plan2net/backend-category-hierarchy
Configuration
By default, a category record like Java under Programming under Topic renders as:
Java (Programming > Topic)
The extension ships a Site Set with the defaults. Activate it per Site by
adding the dependency in config/sites/<identifier>/config.yaml:
dependencies: - plan2net/backend-category-hierarchy
That is enough — every Site that depends on the set gets the default
Java (Programming > Topic) rendering without any further configuration.
To override the defaults for a Site, add a settings: block alongside the
dependency:
dependencies: - plan2net/backend-category-hierarchy settings: backendCategoryHierarchy: titleTemplate: '{ancestors} > {current}' ancestorSeparator: ' > ' compactTitleTemplate: '{current} ({ancestors})'
With the override above, list rows render as:
Programming > Topic > Java
In the global backend search (and other narrow popups that truncate at the
end), compactTitleTemplate is used instead so the leaf stays visible:
Java (Programming > Topic)
Placeholders (both templates):
{current}— the category title{ancestors}— the ancestor chain joined byancestorSeparator
Invalid values (empty, or a template missing one of the placeholders) silently
fall back to the defaults {current} ({ancestors}) and >.
Note
Workspaces: the current (leaf) record is workspace-overlaid via
BackendUtility::getRecordWSOL. Ancestor titles and chain structure are read
from live data — workspace edits to a parent category's title or its
parent pointer only become visible in the chain after publication.
Collapsing the chain into a single recursive CTE would require reimplementing
TYPO3's workspace-overlay rules in SQL, which is fragile and out of scope.
Development
composer test:unit # phpunit composer quality # php-cs-fixer + phpstan + psalm + phpunit

