scarbous/mr_base_config

此功能允许在模板扩展中使用配置文件来配置TS-Config和TypoScript。

安装: 6

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

开放问题: 1

类型:typo3-cms-extension

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。

如何安装它?

  1. 基本上下载并安装扩展。

  2. 在您的模板扩展中创建一个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'
        ],
	]
];
  1. 加载配置文件
// ext_localconf.php
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Scarbous\MrBaseConfig\Service\TemplatConfigService', $_EXTKEY);
  1. 定义您的"站点根",并在"站点根"中添加一个空的TypoScript模板。这两个都定义了TypoScript将被添加的位置。

基于

为了让系统完成模板扩展所需的工作,系统需要以下文件夹结构

  • template_extension
    • 配置
    • TypoScript
      • setup.txt
      • constants.txt
    • 扩展
      • news
        • 配置
          • TypoScript
            • setup.txt
            • constants.txt

为什么使用它?

它可以帮助您更好地组织模板扩展。