Skip to content

Commit b7d8bc0

Browse files
committed
Applied comments
1 parent 300d6af commit b7d8bc0

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

reference/twig_reference.rst

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ There may also be tags in bundles you use that aren't listed here.
1919
Functions
2020
---------
2121

22-
.. _function.render:
22+
.. _reference_twig.function.render:
2323

2424
render
2525
~~~~~~
@@ -40,6 +40,8 @@ options
4040
Renders the fragment for the given controller (using `controller() <controller>`_)
4141
or URI. For more information, see :ref:`templating-embedding-controller`.
4242

43+
The render strategy can be specified in the ``strategy`` key of the options.
44+
4345
.. tip::
4446

4547
The URI can be generated by other methods, like `path <path>`_ and
@@ -65,6 +67,13 @@ Generates an ESI tag when possible or falls back to the behaviour of
6567

6668
The URI can be generated by other methods, like `path <path>`_ and
6769
`url() <url>`_.
70+
71+
.. tip::
72+
73+
The ``render_esi()`` function is an example of the shortcut functions
74+
of ``render``. It automatically sets the strategy based on what's given
75+
in the function name, e.g. ``render_hinclude()`` will use the hinclude.js
76+
strategy. This works for all ``render_*()`` functions.
6877

6978
controller
7079
~~~~~~~~~~
@@ -84,7 +93,7 @@ query
8493
**type**: ``array`` **default**: ``[]``
8594

8695
Returns an instance of ``ControllerReference`` to be used with functions like
87-
`render() <function.render>` and `render_esi() <render_esi>`.
96+
:ref:`render() <reference_twig.function.render>` and `render_esi() <render_esi>`.
8897

8998
asset
9099
~~~~~
@@ -128,7 +137,7 @@ variables
128137
**type**: ``array`` **default**: ``[]``
129138

130139
Renders the HTML of a complete form, more information in
131-
:ref:`the Twig Form reference<reference-forms-twig-form>`.
140+
:ref:`the Twig Form reference <reference-forms-twig-form>`.
132141

133142
form_start
134143
~~~~~~~~~~
@@ -143,7 +152,7 @@ variables
143152
**type**: ``array`` **default**: ``[]``
144153

145154
Renders the HTML start tag of a form, more information in
146-
:ref:`the Twig Form reference<reference-forms-twig-start>`.
155+
:ref:`the Twig Form reference <reference-forms-twig-start>`.
147156

148157
form_end
149158
~~~~~~~~
@@ -158,7 +167,7 @@ variables
158167
**type**: ``array`` **default**: ``[]``
159168

160169
Renders the HTML end tag of a form together with all fields that have not been
161-
rendered yet, more information in :ref:`the Twig Form reference<reference-forms-twig-end>`.
170+
rendered yet, more information in :ref:`the Twig Form reference <reference-forms-twig-end>`.
162171

163172
form_enctype
164173
~~~~~~~~~~~~
@@ -366,8 +375,6 @@ text
366375
Makes a technical name human readable (i.e. replaces underscores by spaces and
367376
capitalizes the string).
368377

369-
.. _filter.trans:
370-
371378
trans
372379
~~~~~
373380

@@ -387,8 +394,6 @@ locale
387394
Translates the text into the current language. More information in
388395
:ref:`Translation Filters <book-translation-filters>`.
389396

390-
.. _filter.transchoice:
391-
392397
transchoice
393398
~~~~~~~~~~~
394399

@@ -570,8 +575,6 @@ Sets the resources to override the form theme for the given form view instance.
570575
You can use ``_self`` as resources to set it to the current resource. More
571576
information in :doc:`/cookbook/form/form_customization`.
572577

573-
.. _tag.trans:
574-
575578
trans
576579
~~~~~
577580

@@ -588,8 +591,6 @@ locale
588591

589592
Renders the translation of the content. More information in :ref:`book-translation-tags`.
590593

591-
.. _tag.transchoice:
592-
593594
transchoice
594595
~~~~~~~~~~~
595596

0 commit comments

Comments
 (0)