Skip to content

[Mailer] Update Twig namespace #14822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ arguments to the filter:

You can pass unlimited number of arguments to ``inline_css()`` to load multiple
CSS files. For this example to work, you also need to define a new Twig namespace
called ``css`` that points to the directory where ``email.css`` lives:
called ``styles`` that points to the directory where ``email.css`` lives:

.. _mailer-css-namespace:

Expand Down Expand Up @@ -786,11 +786,11 @@ You can combine all filters to create complex email messages:

.. code-block:: twig

{% apply inky_to_html|inline_css(source('@css/foundation-emails.css')) %}
{% apply inky_to_html|inline_css(source('@styles/foundation-emails.css')) %}
{# ... #}
{% endapply %}

This makes use of the :ref:`css Twig namespace <mailer-css-namespace>` we created
This makes use of the :ref:`styles Twig namespace <mailer-css-namespace>` we created
earlier. You could, for example, `download the foundation-emails.css file`_
directly from GitHub and save it in ``assets/styles``.

Expand Down