通常,您可以将TypoScript文件存储在自定义扩展中; http://localhost/typo3/typo3conf/ext/customTemplates/Configuration/TypoScript/Setup.ts
http://localhost/typo3/typo3conf/ext/customTemplates/Configuration/TypoScript/Setup.ts
(你可以给“customTemplates”任意你喜欢的名字)
然后你可以在TYPO3后端包含它,如下所示:
<INCLUDE_TYPOSCRIPT: source="FILE:typo3conf/ext/customTemplates/Configuration/TypoScript/Setup.ts">
你可以这样做
# Import a single file @import 'EXT:myproject/Configuration/TypoScript/randomfile.typoscript' # Import multiple files in a single directory, sorted by file name @import 'EXT:myproject/Configuration/TypoScript/*.typoscript' # Import all files in a directory @import 'EXT:myproject/Configuration/TypoScript/' # It's possible to omit the file ending, then "typoscript" is automatically added @import 'EXT:myproject/Configuration/TypoScript/'
看到 导入TypoScript文件的新语法
当您拥有自己的扩展时,该示例很有用。 'myproject'就是你的扩展名。 'EXT:'之后是扩展程序中配置文件的路径。
如果您从未构建自己的扩展程序: 使用Extbase和Fluid开发TYPO3扩展