【发布时间】:2016-06-24 19:25:04
【问题描述】:
我想知道如何包含为 Bootstrap 3 设计的表单主题。这个选项是在 Symfony 2.6 中引入的,但在 Symfony 3.1 中它被移动或删除了,因为这个解决方案不能正常工作:New in Symfony 2.6: Bootstrap form theme .
当我尝试设置时:
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
form:
resources: ['bootstrap_3_layout.html.twig']
我收到了这条消息:
致命错误:未捕获的异常 'Symfony\Component\Config\Definition\Exception\InvalidConfigurationException' 带有消息 'Unrecognized option "form" under "twig"' in ...
我知道
{% form_theme form 'bootstrap_3_layout.html.twig' %}
而且效果很好,但我想在配置文件中永久设置这个主题。
【问题讨论】:
标签: symfony