承接 plan2net/backend-category-hierarchy 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

plan2net/backend-category-hierarchy

Composer 安装命令:

composer require plan2net/backend-category-hierarchy

包简介

Show category hierarchy information in list view

README 文档

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

统计信息

  • 总下载量: 933
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2026-03-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固