scarbous / mr_base_config
此功能允许在模板扩展中使用配置文件来配置TS-Config和TypoScript。
dev-master
2018-02-09 15:04 UTC
This package is auto-updated.
Last update: 2024-09-18 02:16:22 UTC
README
它做了什么?
EXT:mr_base_config可以帮助您在模板扩展中组织TypoScript和TSConfig。
如何安装它?
-
基本上下载并安装扩展。
-
在您的模板扩展中创建一个ext_configuration.php文件,并添加如下配置
// ext_configuration.php // this will add TypoScript and TSconfig to all "site roots" return [ 'Typoscript' => [ '_DEFAULT' => [ 'Typoscripts' => [ 'EXT:news/Configuration/TypoScript', 'EXT:css_styled_content/static', ], 'Extensions' => [ 'news' ], ] ], Tsconfig => [ '_DEFAULT' => [ 'Configuration/TsConfig/Page/Rte.ts', 'Configuration/TsConfig/Page/Config.ts', 'Configuration/TsConfig/User/Config.ts' ], ] ];
// ext_configuration.php // this will add TypoScript to the "site root" with the sys_domain "your-domain.de" and TSconfig to the page "5" return [ 'Typoscript' => [ 'your-domain.de' => [ 'Typoscripts' => [ 'EXT:news/Configuration/TypoScript', 'EXT:css_styled_content/static', ], 'Extensions' => [ 'news' ], ] ], Tsconfig => [ '5' => [ 'Configuration/TsConfig/Page/Rte.ts', 'Configuration/TsConfig/Page/Config.ts', 'Configuration/TsConfig/User/Config.ts' ], ] ];
- 加载配置文件
// ext_localconf.php \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Scarbous\MrBaseConfig\Service\TemplatConfigService', $_EXTKEY);
- 定义您的"站点根",并在"站点根"中添加一个空的TypoScript模板。这两个都定义了TypoScript将被添加的位置。
基于
为了让系统完成模板扩展所需的工作,系统需要以下文件夹结构
- template_extension
- 配置
- TypoScript
- setup.txt
- constants.txt
- 扩展
- news
- 配置
- TypoScript
- setup.txt
- constants.txt
- TypoScript
- 配置
- news
为什么使用它?
它可以帮助您更好地组织模板扩展。