1``inky_to_html``
2================
3
4.. versionadded:: 2.12
5
6    The ``inky_to_html`` filter was added in Twig 2.12.
7
8The ``inky_to_html`` filter processes an `inky email template
9<https://github.com/zurb/inky>`_:
10
11.. code-block:: html+twig
12
13    {% apply inky_to_html %}
14        <row>
15            <columns large="6"></columns>
16            <columns large="6"></columns>
17        </row>
18    {% endapply %}
19
20You can also use the filter on an included file:
21
22.. code-block:: twig
23
24    {{ include('some_template.inky.twig')|inky_to_html }}
25
26.. note::
27
28    The ``inky_to_html`` filter is part of the ``InkyExtension`` which is not
29    installed by default. Install it first:
30
31    .. code-block:: bash
32
33        $ composer require twig/inky-extra
34
35    Then, on Symfony projects, install the ``twig/extra-bundle``:
36
37    .. code-block:: bash
38
39        $ composer require twig/extra-bundle
40
41    Otherwise, add the extension explicitly on the Twig environment::
42
43        use Twig\Extra\Inky\InkyExtension;
44
45        $twig = new \Twig\Environment(...);
46        $twig->addExtension(new InkyExtension());
47