Skip to content
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

Expose all system generated emails as .liquid files #22396

Open
binaryben opened this issue May 6, 2024 · 5 comments
Open

Expose all system generated emails as .liquid files #22396

binaryben opened this issue May 6, 2024 · 5 comments

Comments

@binaryben
Copy link

Describe the Improvement

The notification email for in-app notifications should be exposed as a .liquid file so that users can customise it. If possible, it may be worth seeing if any other system emails are generated that should be customisable and exposed in a template.

@robinsonjohn
Copy link

From what I can tell, all email templates reside here, which at the moment include:

  • password-reset
  • user-invitation

At a minimum, Directus is sending out at least one other type of email, which is the email sent to notify a user of a new in-app notification.

Screenshot 2024-05-06 at 7 02 16 AM

@robinsonjohn
Copy link

In addition, the documentation states that when a person is mentioned by typing the @ symbol, an email will be sent directing them to the comment.

@binaryben
Copy link
Author

H/T @connorwinston for pointing out these types of emails just use the base.liquid file. Would mentions and emailed notifications be served well by a single new notification.liquid template which would probably be blank except for referencing base.liquid?

@robinsonjohn
Copy link

I have customized all three available email template files:

  • base.liquid
  • password-reset.liquid
  • user-invitation.liquid

After doing this, I have noticed the following:

Emails sent alongside in-app notifications do not use the base.liquid template. Also, there is no specific template available for this email.

Emails sent from @ mentions in a comment do use the base.liquid template, but there is no specific template available for this email either.

So, at a minimum, there are these two additional emails which need a template file to customize. In addition, the base.liquid template is being ignored in the in-app notification email.

Also, there currently seems to be no way to customize the email subject for any emails sent by Directus.

@robinsonjohn
Copy link

Also, the base.liquid file makes reference to a footer block, but I don't see any reference to it in the documentation, and again, no .liquid template file available.

{% block footer %}{% endblock %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 Needs Triage
Development

No branches or pull requests

3 participants