本文介绍了TYPO3表单多复选框部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编辑核心文件form \ Resources \ Private \ Frontend \ Partials \ Field \ Field.html来更改前端的html输出.如果我更改该文件,则没有效果.如果更改核心文件形式\ Resources \ Private \ Frontend \ Partials \ Textarea.html,则会影响前端的输出.

I tried to edit the core file form\Resources\Private\Frontend\Partials\Field\Field.html to change the html output in the frontend. If I change that file, it has not effetcs. If I change the core file form\Resources\Private\Frontend\Partials\Textarea.html it effects the output in the frontend.

我试图设置一个自定义的局部,布局和模板文件夹,如下所示:我已经在页面模板的设置部分中设置了以下内容:

I've tried to set a custom partial, layout and templates folder like this:I've set the following in the setup part of the page template:

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中

In fileadmin/my_site_package/Configuration/Form/CustomFormSetup.yaml I have

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/'

在文件夹文件admin/my_site_package/Resources/Private/Partials/Form/Frontend/中,我从表单核心文件夹复制了Multicheckbox.html和其他复制的部分文件.我已经编辑了Multicheckbox.html,但是它对前端没有影响.

In the folder fileadmin/my_site_package/Resources/Private/Partials/Form/Frontend/ I have the copied Multicheckbox.html and the other copied partial files from the form core folder. I have edited the Multicheckbox.html, but it has not effects to the frontend.

推荐答案

非常感谢您的投入.问题是由于引导程序包.文件夹"typo3conf/ext/bootstrap_package/Resources/Private/Partials/Form"中有一个文件Multicheckbox.html.这个覆盖了核心文件Multicheckbox.html

Thank you so much for your input. The problem was because of the bootstrap package. There was a file Multicheckbox.html in the folder "typo3conf/ext/bootstrap_package/Resources/Private/Partials/Form". This one overrided the core file Multicheckbox.html

但是我在步骤中做错了什么?我现在在前端收到以下错误:

But what am I doing wrong in my steps? I'm getting now the following error in the frontend:

糟糕,发生错误!尝试解析用于控制器动作"FormFrontend-> form"的模板文件.格式为".html",但没有路径包含预期的模板文件(FormFrontend/Form.html).没有配置路径.有关此错误的更多信息可能在线提供.

Oops, an error occurred!Tried resolving a template file for controller action "FormFrontend->form" in format ".html", but none of the paths contained the expected template file (FormFrontend/Form.html). No paths configured.More information regarding this error might be available online.

我在CustomFormSetup.yaml中设置路径错误吗?我也尝试过

Did I set the paths in CustomFormSetup.yaml wrong?I've also tried

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/'

具有相同的错误.

这篇关于TYPO3表单多复选框部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 05:40