plan2net/backend-category-hierarchy

Show category hierarchy information in list view

Maintainers

Package info

github.com/plan2net/backend-category-hierarchy

Homepage

Type:typo3-cms-extension

pkg:composer/plan2net/backend-category-hierarchy

Statistics

Installs: 730

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

14.0.0 2026-05-17 07:58 UTC

This package is auto-updated.

Last update: 2026-05-17 08:02:24 UTC


README

Packagist Version Downloads Supported TYPO3 Supported PHP License

Show the full parent path of every sys_category record in TYPO3 backend lists.

Backend list view of categories

The hierarchy is also shown in the global backend search:

Hierarchy 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 by ancestorSeparator

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