Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit225ba41

Browse files
committed
minor#10126 Improve the docs about custom form theme config (javiereguiluz)
This PR was merged into the 2.8 branch.Discussion----------Improve the docs about custom form theme configRelated tosymfony/symfony#26879Commits-------0c624b5 Improve the docs about custom form theme config
2 parentscc59ca7 +0c624b5 commit225ba41

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎form/form_themes.rst‎

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp