Skip to content

Commit b3ef599

Browse files
ybenhssaienOskarStark
authored andcommitted
add html extension to snake_case recommendation examples
Some readers may inconsciently memorize the syntax `file_name.twig` and ignores the second `recommendation` (declaring two extension `html.twig`), it can happen if someone looks only for `snak_case` keyword without reading whole page. I suggest to add `html` extension on the first examples to make sure recommendations cannot escape reader.
1 parent 2062d4a commit b3ef599

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ Template Naming
118118

119119
Symfony recommends the following for template names:
120120

121-
* Use `snake case`_ for filenames and directories (e.g. ``blog_posts.twig``,
122-
``admin/default_theme/blog/index.twig``, etc.);
121+
* Use `snake case`_ for filenames and directories (e.g. ``blog_posts.html.twig``,
122+
``admin/default_theme/blog/index.html.twig``, etc.);
123123
* Define two extensions for filenames (e.g. ``index.html.twig`` or
124124
``blog_posts.xml.twig``) being the first extension (``html``, ``xml``, etc.)
125125
the final format that the template will generate.

0 commit comments

Comments
 (0)