Skip to content

Commit 0c624b5

Browse files
committed
Improve the docs about custom form theme config
1 parent c7b9cf1 commit 0c624b5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

form/form_themes.rst

+8
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ file:
179179
# app/config/config.yml
180180
twig:
181181
form_themes:
182+
- '...'
182183
- 'form/fields.html.twig'
183184
# ...
184185
@@ -194,6 +195,7 @@ file:
194195
http://symfony.com/schema/dic/twig http://symfony.com/schema/dic/twig/twig-1.0.xsd">
195196
196197
<twig:config>
198+
<twig:theme>...</twig:theme>
197199
<twig:theme>form/fields.html.twig</twig:theme>
198200
<!-- ... -->
199201
</twig:config>
@@ -204,11 +206,17 @@ file:
204206
// app/config/config.php
205207
$container->loadFromExtension('twig', array(
206208
'form_themes' => array(
209+
'...',
207210
'form/fields.html.twig',
208211
),
209212
// ...
210213
));
211214
215+
.. note::
216+
217+
Add your custom theme at the end of the ``form_themes`` list because each
218+
theme overrides all the previous themes.
219+
212220
Any blocks inside the ``fields.html.twig`` template are now used globally
213221
to define form output.
214222

0 commit comments

Comments
 (0)