@@ -102,7 +102,7 @@ Although most of the times you'll apply form themes globally, you may need to
102
102
apply a theme only to some specific form. You can do that with the
103
103
:ref: `form_theme Twig tag <reference-twig-tag-form-theme >`:
104
104
105
- .. code-block :: html+ twig
105
+ .. code-block :: twig
106
106
107
107
{# this form theme will be applied only to the form of this template #}
108
108
{% form_theme form 'foundation_5_layout.html.twig' %}
@@ -137,7 +137,7 @@ Applying Different Themes to Child Forms
137
137
138
138
You can also apply a form theme to a specific child of your form:
139
139
140
- .. code-block :: html+ twig
140
+ .. code-block :: twig
141
141
142
142
{% form_theme form.a_child_form 'form/my_custom_theme.html.twig' %}
143
143
@@ -161,7 +161,7 @@ can be installed on different Symfony apps (and so you can't control what themes
161
161
are enabled globally). To do that, add the ``only `` keyword after the list of
162
162
form themes:
163
163
164
- .. code-block :: html+ twig
164
+ .. code-block :: twig
165
165
166
166
{% form_theme form with ['foundation_5_layout.html.twig'] only %}
167
167
@@ -175,7 +175,7 @@ form themes:
175
175
yourself, or extend one of the built-in form themes with Twig's ``use ``
176
176
keyword instead of ``extends `` to re-use the original theme contents.
177
177
178
- .. code-block :: html+ twig
178
+ .. code-block :: twig
179
179
180
180
{# templates/form/common.html.twig #}
181
181
{% use "form_div_layout.html.twig" %}
@@ -192,7 +192,7 @@ with one or more of those blocks that you want to use when rendering a form.
192
192
Consider for example a form field that represents an integer property called
193
193
``age ``. If you add this to the template:
194
194
195
- .. code-block :: html+ twig
195
+ .. code-block :: twig
196
196
197
197
{{ form_widget(form.age) }}
198
198
@@ -377,7 +377,7 @@ rules to know which Twig blocks to define.
377
377
For example, if your form theme is simple and you only want to override the
378
378
``<input type="integer"> `` elements, create this template:
379
379
380
- .. code-block :: html+ twig
380
+ .. code-block :: twig
381
381
382
382
{# templates/form/my_theme.html.twig #}
383
383
{% block integer_widget %}
@@ -429,7 +429,7 @@ you want to apply the theme globally to all forms, define the
429
429
430
430
If you only want to apply it to some specific forms, use the ``form_theme `` tag:
431
431
432
- .. code-block :: html+ twig
432
+ .. code-block :: twig
433
433
434
434
{% form_theme form 'form/my_theme.html.twig' %}
435
435
@@ -453,7 +453,7 @@ built-in themes using the `Twig "use" tag`_ instead of the ``extends`` tag so
453
453
you can inherit all its blocks (if you are unsure, extend from the default
454
454
``form_div_layout.html.twig `` theme):
455
455
456
- .. code-block :: html+ twig
456
+ .. code-block :: twig
457
457
458
458
{# templates/form/my_theme.html.twig #}
459
459
{% use 'form_div_layout.html.twig' %}
0 commit comments