Skip to content
Draft
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
45 changes: 45 additions & 0 deletions docs/themes/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@

This file is mainly used as the Landing Page for when a Contact unsubscribes or resubscribes to the system's Emails. Other areas use this so all Themes should include it.

.. vale off

In the unsubscribe and resubscribe flow, the email address validation step now precedes this page. See :ref:`themes/getting_started:html/email-validation.html.twig`.

.. vale on

It requires echoing two variables: ``message`` and ``content``.

``message`` contains the string message such as "You have been unsubscribed."
Expand All @@ -138,6 +144,45 @@
</body>
</html>

``html/email-validation.html.twig``
-----------------------------------

Mautic uses this template to render the 'Confirm your email address' validation page that recipients see before they unsubscribe or resubscribe.

Check warning on line 150 in docs/themes/getting_started.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Landing Page' instead of 'page'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Landing Page' instead of 'page'.", "location": {"path": "docs/themes/getting_started.rst", "range": {"start": {"line": 150, "column": 81}}}, "severity": "INFO"}

Check warning on line 150 in docs/themes/getting_started.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Email' instead of 'email'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Email' instead of 'email'.", "location": {"path": "docs/themes/getting_started.rst", "range": {"start": {"line": 150, "column": 55}}}, "severity": "INFO"}

Unlike the feature files (``email``, ``form``, and ``page``), this template is optional. It isn't a required feature file and doesn't go in the ``features`` array. If a Theme doesn't provide it, Mautic renders the core template. A Theme only adds it to customize the validation page's appearance.

Check warning on line 152 in docs/themes/getting_started.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Landing Page' instead of 'page'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Landing Page' instead of 'page'.", "location": {"path": "docs/themes/getting_started.rst", "range": {"start": {"line": 152, "column": 279}}}, "severity": "INFO"}

Check warning on line 152 in docs/themes/getting_started.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Google.Parens] Use parentheses judiciously. Raw Output: {"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "docs/themes/getting_started.rst", "range": {"start": {"line": 152, "column": 1}}}, "severity": "INFO"}

The template extends the core template ``@MauticCore/Theme/email-validation.html.twig``, which in turn extends ``message.html.twig`` through the ``message_content`` block.

A Theme can override the following Twig blocks:

* ``message_content`` - the outer content region. The core validation template overrides this block from ``message.html.twig`` to inject the validation page.

Check warning on line 158 in docs/themes/getting_started.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Landing Page' instead of 'page'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Landing Page' instead of 'page'.", "location": {"path": "docs/themes/getting_started.rst", "range": {"start": {"line": 158, "column": 153}}}, "severity": "INFO"}
* ``validation_content`` - the validation card holding the heading, the instructional message, and the email address confirmation Form.

Check warning on line 159 in docs/themes/getting_started.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Email' instead of 'email'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Email' instead of 'email'.", "location": {"path": "docs/themes/getting_started.rst", "range": {"start": {"line": 159, "column": 104}}}, "severity": "INFO"}
* ``validation_error`` - the alert region shown when the submitted email address doesn't match the address the link was generated for.

Check warning on line 160 in docs/themes/getting_started.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Google.Passive] In general, use active voice instead of passive voice ('was generated'). Raw Output: {"message": "[Google.Passive] In general, use active voice instead of passive voice ('was generated').", "location": {"path": "docs/themes/getting_started.rst", "range": {"start": {"line": 160, "column": 117}}}, "severity": "INFO"}

Check warning on line 160 in docs/themes/getting_started.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Email' instead of 'email'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Email' instead of 'email'.", "location": {"path": "docs/themes/getting_started.rst", "range": {"start": {"line": 160, "column": 68}}}, "severity": "INFO"}
* ``validation_enhancements`` - the page's styling and the progressive-enhancement script, for example the submit button's loading state.

Check warning on line 161 in docs/themes/getting_started.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Landing Page' instead of 'page'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Landing Page' instead of 'page'.", "location": {"path": "docs/themes/getting_started.rst", "range": {"start": {"line": 161, "column": 37}}}, "severity": "INFO"}

Mautic resolves the template in the following order:

#. ``html/email-validation.html.twig`` in the Theme selected for the Email.
#. The default (``system``) Theme.

Check warning on line 166 in docs/themes/getting_started.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Google.Parens] Use parentheses judiciously. Raw Output: {"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "docs/themes/getting_started.rst", "range": {"start": {"line": 166, "column": 1}}}, "severity": "INFO"}
#. All installed Themes.

The blank Theme ships an example override you can copy as a starting point. Override any of the blocks above, or the ``content`` block it inherits from ``message.html.twig``, to customize the page:

.. code-block:: twig

{% extends '@MauticCore/Theme/email-validation.html.twig' %}

{#
This file intentionally only extends the core template.
It exists as an example entry point for theme-level customization.

Example usage:

{% block content %}
{{ parent() }}
{% endblock %}
#}

``html/email.html.twig``
------------------------

Expand Down
Loading