forms - TYPO3 表单多复选框部分
问题描述
我尝试编辑核心文件 form\Resources\Private\Frontend\Partials\Field\Field.html 以更改前端的 html 输出。如果我更改该文件,它没有效果。如果我更改核心文件 form\Resources\Private\Frontend\Partials\Textarea.html 它会影响前端的输出。
我尝试像这样设置自定义部分、布局和模板文件夹:我在页面模板的设置部分设置了以下内容:
plugin.tx_form {
settings {
yamlConfigurations {
# register your own additional configuration
# choose a number higher than 30 (below is reserved)
100 = fileadmin/my_site_package/Configuration/Form/CustomFormSetup.yaml
}
}
}
在 fileadmin/my_site_package/Configuration/Form/CustomFormSetup.yaml 我有
TYPO3:
CMS:
Form:
prototypes:
standard:
formElementsDefinition:
Form:
renderingOptions:
templateRootPaths:
20:'fileadmin/my_site_package/Resources/Private/Templates/Form/Frontend/'
partialRootPaths:
20: 'fileadmin/my_site_package/Resources/Private/Partials/Form/Frontend/'
在文件夹 fileadmin/my_site_package/Resources/Private/Partials/Form/Frontend/ 我有从表单核心文件夹复制的 Multicheckbox.html 和其他复制的部分文件。我已经编辑了 Multicheckbox.html,但它对前端没有影响。
解决方案
非常感谢您的意见。问题是由于引导程序包。文件夹“typo3conf/ext/bootstrap_package/Resources/Private/Partials/Form”中有一个文件 Multicheckbox.html。这个覆盖了核心文件 Multicheckbox.html
但是我在我的步骤中做错了什么?我现在在前端收到以下错误:
糟糕,发生错误!尝试以“.html”格式解析控制器操作“FormFrontend->form”的模板文件,但没有一个路径包含预期的模板文件(FormFrontend/Form.html)。未配置路径。有关此错误的更多信息可能在线提供。
我是否在 CustomFormSetup.yaml 中设置了错误的路径?我也试过
TYPO3:
CMS:
Form:
prototypes:
standard:
formElementsDefinition:
Form:
renderingOptions:
templateRootPaths:
1:'/my_site_package/Resources/Private/Templates/Form/Frontend/'
partialRootPaths:
1:'/my_site_package/Resources/Private/Partials/Form/Frontend/'
有同样的错误。
推荐阅读
- haskell - `Alt` 类型类的函子分布规律是微不足道的吗?
- jquery - 将 html 元素从变量保存到 sessionStorage 并检索它 - jQuery
- opencv - 如何在字符垂直(而不是沿对角线)放置的图像中裁剪字符补丁
- python-3.x - Python事件调度程序在特定时间后仅运行一次
- angular - 选择输入的反应形式设置值
- javascript - 为什么我的事件监听器不工作?没有 Javascript 控制台错误
- c# - 如何验证 MVC5 中模型的输入
- python - 如何在不暂停所有脚本的情况下暂停 python 中的一行代码?
- jmeter - Taurus 中多个场景的并行分布式执行
- react-native - WebViewClient.onReceivedSslError 处理程序的不安全实现