我正在尝试创建一个可以在TYPO3中重复使用的模板。我想将它作为社区的免费扩展提供。目前,我遵循YouTube视频系列https://www.youtube.com/watch?v=HtBmim7pc0o和https://www.sitepackagebuilder.com/)和https://github.com/benjaminkott/bootstrap_package中指定的标准。 我需要' MASK'模板但无法访问相关的教程。有人可以帮帮我吗? 提前致谢。 此致
答案 0 :(得分:0)
在bootstrap_package / Configuration / TypoScript / constants.typoscript中你看到:
page.fluidtemplate {
# cat=bootstrap package: advanced/100/100; type=string; label=Layout Root Path: Path to layouts
layoutRootPath = EXT:bootstrap_package/Resources/Private/Layouts/Page/
# cat=bootstrap package: advanced/100/110; type=string; label=Partial Root Path: Path to partials
partialRootPath = EXT:bootstrap_package/Resources/Private/Partials/Page/
# cat=bootstrap package: advanced/100/120; type=string; label=Template Root Path: Path to templates
templateRootPath = EXT:bootstrap_package/Resources/Private/Templates/Page/
}
或者:
###############
### FELOGIN ###
###############
styles.content.loginform {
templateFile = EXT:bootstrap_package/Resources/Private/Templates/FrontendLogin/FrontendLogin.html
}
这部分告诉模板从这些路径加载。要覆盖(你说我相信的面具)将一个副本(你要编辑的)放在一个文件夹中并放入你的常量文件中:
page.fluidtemplate {
layoutRootPath = fileadmin/folder/folder/Layouts
partialRootPath = fileadmin/folder/folder/Partials
templateRootPath = fileadmin/folder/folder/Templates
}
或者:
styles.content.loginform {
templateFile = fileadmin/folder/folder/yourcopyofthefile.html
}
因此,您可以覆盖单个模板和整个模板文件夹。从扩展名中复制文件"资源/模板"或者"资源/部分"等
可以使用在根模板(默认根模板)>的后端设置的常量文件来编辑常量。编辑>一般>常量字段和用法:
<INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/folder/folder/typoscript/constants.ts">
或直接在该字段中使用您的覆盖代码。
希望它能进一步帮助你。