Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0c624b5

Browse filesBrowse files
committed
Improve the docs about custom form theme config
1 parent c7b9cf1 commit 0c624b5
Copy full SHA for 0c624b5

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed

‎form/form_themes.rst

Copy file name to clipboardExpand all lines: form/form_themes.rst
+8Lines changed: 8 additions & 0 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.