定制 b13/newspage-sorting 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

b13/newspage-sorting

最新稳定版本:0.2.0

Composer 安装命令:

composer require b13/newspage-sorting

包简介

Adds automatic sorting of news pages by date in the backend.

README 文档

README

This extension adds automatic sorting of news pages inside a "newspage" module to the backend.

In order for this to work, simply select the "News" module type of folder in the backend and create news inside of it.

By default, news pages are sorted into new folders by year, month and day.

Settings

The extension settings allow changing the sorting depth by disabling folders for each day, or month.

Further Customisation

For further customisation, you can override the hook in your project.
The hook is registered with a fixed array key tx_b13_newspage_sorting so you can easily extend the hook and replace it with your own version:

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['tx_newspage_sorting'] =
    YourVendor\YourExtension\Hooks\SortNewsOverride::class;

This class contains the whole logic for the creation and sorting of the storage folders.

The most important function which you might want to override within this hook is getCustomisableFieldsForFolder, which allows changing the title and setting values for other fields, if required.

    protected function getCustomisableFieldsForFolder(\DateTime $date, FolderType $type): array
    {
        return [
            'title' => $date->format($type->value),
        ];
    }

统计信息

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

GitHub 信息

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

其他信息

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