2

When an email key is registered for use with craft()->email->sendEmailByKey, it shows up in the control panel at Email Settings->Messages. This seems like a great way to allow easy editing of the messages by clients.

If I have something hardcoded in my plugin's translations folder (e.g. /translations/en_us.php) corresponding to the email message key, will the subject and body always come from that file, or will it come from the data in the control panel? Specifically, if an update is made to the template in the control panel, does that completely override the template defined in the translations file? If so, is there a way to revert back to the version in the translation file?

2

The answer is both. It will use whatever’s in the translation file by default, until an admin goes to Settings > Email > Messages and customizes it.

  • 1
    Ok, so just to confirm, once a change has been made in Settings > Email > Messages, i.e. once it has been customized, it will always use the customized version going forward and there's no way to go back to using the translation file version? – John O Oct 2 '15 at 17:22
  • Correct - the translation file just supplies the default values. – Brandon Kelly Oct 2 '15 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.