aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/twig/twig/doc/functions/template_from_string.rst
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twig/twig/doc/functions/template_from_string.rst')
-rw-r--r--vendor/twig/twig/doc/functions/template_from_string.rst32
1 files changed, 0 insertions, 32 deletions
diff --git a/vendor/twig/twig/doc/functions/template_from_string.rst b/vendor/twig/twig/doc/functions/template_from_string.rst
deleted file mode 100644
index bbb06d86..00000000
--- a/vendor/twig/twig/doc/functions/template_from_string.rst
+++ /dev/null
@@ -1,32 +0,0 @@
1``template_from_string``
2========================
3
4.. versionadded:: 1.11
5 The template_from_string function was added in Twig 1.11.
6
7The ``template_from_string`` function loads a template from a string:
8
9.. code-block:: jinja
10
11 {{ include(template_from_string("Hello {{ name }}") }}
12 {{ include(template_from_string(page.template)) }}
13
14.. note::
15
16 The ``template_from_string`` function is not available by default. You
17 must add the ``Twig_Extension_StringLoader`` extension explicitly when
18 creating your Twig environment::
19
20 $twig = new Twig_Environment(...);
21 $twig->addExtension(new Twig_Extension_StringLoader());
22
23.. note::
24
25 Even if you will probably always use the ``template_from_string`` function
26 with the ``include`` function, you can use it with any tag or function that
27 takes a template as an argument (like the ``embed`` or ``extends`` tags).
28
29Arguments
30---------
31
32 * ``template``: The template