-
Notifications
You must be signed in to change notification settings - Fork 275
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
Rendered preview in admin #325
Comments
You mean something like this? This will be available in the next major release, presumable 3.5 |
Yes. That's very similar 👍 |
@jrief I'm reopening this because that feature is similar but not nearly as useful as the one I'm proposing here :) It currently only shows the rendered version of sent emails. My code shows how an email template will look for both HTML and text before you send it using example context passed along as JSON data. Additionally, it also shows the variants in all other languages if available. |
I see! So basically you show how future emails will be get rendered, while my former pull request show how sent emails have been rendered. Yes, I believe inside the post_office template view, this could be quite useful. Do you have a screenshot of that feature? |
This is how it currently looks. The only data model change it requires (I think) is the addition of a json field to specify the template variables. I'm using iframes with separate requests for the rendering. The advantage of this method is that if you have a template syntax error or something it won't break the admin page |
You can see the current diff here: master...WoLpH:master |
This feature would really be useful for drafting email templates. |
Should I prepare a clean pull request in that case? |
In my fork of the project I have a rendered preview of the email which is a really useful feature if you ask me. It shows both the text and html variant of the mail in an iframe within the admin.
Would this be an interesting addition for the project?
The changes needed:
example_context
field added to theEmailTemplate
modelI can work on making a clean pull request if this is something that would be merged :)
The text was updated successfully, but these errors were encountered: