From 4b645b480b10100d91a02a1c01c7b37cc4cce43e Mon Sep 17 00:00:00 2001 From: Aurimas Date: Tue, 5 Dec 2023 21:39:42 +0200 Subject: [PATCH] Fix custom form type docs. --- form/create_custom_field_type.rst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/form/create_custom_field_type.rst b/form/create_custom_field_type.rst index ccb90a04377..7292356841d 100644 --- a/form/create_custom_field_type.rst +++ b/form/create_custom_field_type.rst @@ -362,9 +362,8 @@ fragments used to render the types: {# ... here you will add the Twig code ... #} -Then, update the :ref:`form_themes option ` to -add this new template at the beginning of the list (the first one overrides the -rest of files): +Then, update the :ref:`form_themes option ` to +add this new template at the end of the list (each theme overrides all the previous ones): .. configuration-block:: @@ -373,8 +372,8 @@ rest of files): # config/packages/twig.yaml twig: form_themes: - - 'form/custom_types.html.twig' - '...' + - 'form/custom_types.html.twig' .. code-block:: xml @@ -389,8 +388,8 @@ rest of files): https://symfony.com/schema/dic/twig/twig-1.0.xsd"> - form/custom_types.html.twig ... + form/custom_types.html.twig @@ -401,8 +400,8 @@ rest of files): return static function (TwigConfig $twig) { $twig->formThemes([ - 'form/custom_types.html.twig', '...', + 'form/custom_types.html.twig', ]); };