5 The ``source`` function was added in Twig 1.15.
7 .. versionadded:: 1.18.3
8 The ``ignore_missing`` flag was added in Twig 1.18.3.
10 The ``source`` function returns the content of a template without rendering it:
14 {{ source('template.html') }}
15 {{ source(some_var) }}
17 When you set the ``ignore_missing`` flag, Twig will return an empty string if
18 the template does not exist:
22 {{ source('template.html', ignore_missing = true) }}
24 The function uses the same template loaders as the ones used to include
25 templates. So, if you are using the filesystem loader, the templates are looked
26 for in the paths defined by it.
31 * ``name``: The name of the template to read
32 * ``ignore_missing``: Whether to ignore missing templates or not