From 2062d4aba76006465689198102bbe69f8d69c68f Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Thu, 12 Nov 2020 09:58:52 +0100 Subject: [PATCH 1/2] Minor: Fix namespace --- mailer.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailer.rst b/mailer.rst index ac83f41fe1e..025a5c43813 100644 --- a/mailer.rst +++ b/mailer.rst @@ -586,7 +586,7 @@ arguments to the filter: .. code-block:: html+twig - {% apply inline_css(source('@styles/email.css')) %} + {% apply inline_css(source('@css/email.css')) %}

Welcome {{ username }}!

{# ... #} {% endapply %} From b3ef599517f14edf6be9ec602faa3c97f51512ac Mon Sep 17 00:00:00 2001 From: Youssef Benhssaien Date: Wed, 11 Nov 2020 08:44:53 +0100 Subject: [PATCH 2/2] 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. --- templates.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates.rst b/templates.rst index f415eaa82e3..1431e0244a9 100644 --- a/templates.rst +++ b/templates.rst @@ -118,8 +118,8 @@ Template Naming Symfony recommends the following for template names: -* Use `snake case`_ for filenames and directories (e.g. ``blog_posts.twig``, - ``admin/default_theme/blog/index.twig``, etc.); +* Use `snake case`_ for filenames and directories (e.g. ``blog_posts.html.twig``, + ``admin/default_theme/blog/index.html.twig``, etc.); * Define two extensions for filenames (e.g. ``index.html.twig`` or ``blog_posts.xml.twig``) being the first extension (``html``, ``xml``, etc.) the final format that the template will generate.