Skip to content

Commit 3969fd6

Browse files
committed
minor #4432 [Reference][Twig] tweaks to the Twig reference (xabbuh)
This PR was merged into the 2.3 branch. Discussion ---------- [Reference][Twig] tweaks to the Twig reference | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | Commits ------- 420d411 tweaks to the Twig reference
2 parents 188dd1f + 420d411 commit 3969fd6

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

reference/twig_reference.rst

+18-8
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@ Symfony Twig Extensions
77
=======================
88

99
Twig is the default template engine for Symfony. By itself, it already contains
10-
a lot of built-in functions, filters, tags and tests (`http://twig.sensiolabs.org/documentation`_
11-
then scroll to the bottom).
10+
a lot of built-in functions, filters, tags and tests (learn more about them
11+
from the the `Twig Reference`_).
1212

13-
Symfony adds more custom extension on top of Twig to integrate some components
14-
into the Twig templates. Below is information about all the custom functions,
15-
filters, tags and tests that are added when using the Symfony Core Framework.
13+
Symfony adds more custom extensions on top of Twig to integrate some components
14+
into the Twig templates. You can find more information about the custom
15+
:ref:`functions <reference-twig-functions>`, :ref:`filters <reference-twig-filters>`,
16+
:ref:`tags <reference-twig-tags>` and :ref:`tests <reference-twig-tests>`
17+
that are added when using the Symfony Core Framework.
1618

1719
There may also be tags in bundles you use that aren't listed here.
1820

21+
.. _reference-twig-functions:
22+
1923
Functions
2024
---------
2125

@@ -40,7 +44,7 @@ render
4044
Renders the fragment for the given controller (using the `controller`_ function)
4145
or URI. For more information, see :ref:`templating-embedding-controller`.
4246

43-
The render strategy can be specified in the ``strategy`` key of the options.
47+
The render strategy can be specified in the ``strategy`` key of the options.
4448

4549
.. tip::
4650

@@ -65,7 +69,7 @@ Generates an ESI tag when possible or falls back to the behaviour of
6569
.. tip::
6670

6771
The URI can be generated by other functions, like `path`_ and `url`_.
68-
72+
6973
.. tip::
7074

7175
The ``render_esi()`` function is an example of the shortcut functions
@@ -354,6 +358,8 @@ Returns the absolute URL (with scheme and host) for the given route. If
354358
``schemeRelative`` is enabled, it'll create a scheme-relative URL. More
355359
information in :ref:`book-templating-pages`.
356360

361+
.. _reference-twig-filters:
362+
357363
Filters
358364
-------
359365

@@ -554,6 +560,8 @@ file_link
554560
Generates a link to the provided file (and optionally line number) using a
555561
preconfigured scheme.
556562

563+
.. _reference-twig-tags:
564+
557565
Tags
558566
----
559567

@@ -620,6 +628,8 @@ trans_default_domain
620628

621629
This will set the default domain in the current template.
622630

631+
.. _reference-twig-tests:
632+
623633
Tests
624634
-----
625635

@@ -669,5 +679,5 @@ Those bundles can have other Twig extensions:
669679
``{% image %}`` tags. You can read more about them in
670680
:doc:`the Assetic Documentation </cookbook/assetic/asset_management>`.
671681

682+
.. _`Twig Reference`: http://twig.sensiolabs.org/documentation#reference
672683
.. _`the official Twig Extensions documentation`: http://twig.sensiolabs.org/doc/extensions/index.html
673-
.. _`http://twig.sensiolabs.org/documentation`: http://twig.sensiolabs.org/documentation

0 commit comments

Comments
 (0)