@@ -7,15 +7,19 @@ Symfony Twig Extensions
7
7
=======================
8
8
9
9
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 `_ ).
12
12
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.
16
18
17
19
There may also be tags in bundles you use that aren't listed here.
18
20
21
+ .. _reference-twig-functions :
22
+
19
23
Functions
20
24
---------
21
25
40
44
Renders the fragment for the given controller (using the `controller `_ function)
41
45
or URI. For more information, see :ref: `templating-embedding-controller `.
42
46
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.
44
48
45
49
.. tip ::
46
50
@@ -65,7 +69,7 @@ Generates an ESI tag when possible or falls back to the behaviour of
65
69
.. tip ::
66
70
67
71
The URI can be generated by other functions, like `path `_ and `url `_.
68
-
72
+
69
73
.. tip ::
70
74
71
75
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
354
358
``schemeRelative `` is enabled, it'll create a scheme-relative URL. More
355
359
information in :ref: `book-templating-pages `.
356
360
361
+ .. _reference-twig-filters :
362
+
357
363
Filters
358
364
-------
359
365
@@ -554,6 +560,8 @@ file_link
554
560
Generates a link to the provided file (and optionally line number) using a
555
561
preconfigured scheme.
556
562
563
+ .. _reference-twig-tags :
564
+
557
565
Tags
558
566
----
559
567
@@ -620,6 +628,8 @@ trans_default_domain
620
628
621
629
This will set the default domain in the current template.
622
630
631
+ .. _reference-twig-tests :
632
+
623
633
Tests
624
634
-----
625
635
@@ -669,5 +679,5 @@ Those bundles can have other Twig extensions:
669
679
``{% image %} `` tags. You can read more about them in
670
680
:doc: `the Assetic Documentation </cookbook/assetic/asset_management >`.
671
681
682
+ .. _`Twig Reference` : http://twig.sensiolabs.org/documentation#reference
672
683
.. _`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