groupe-sii / ogham

Sending email, sms or whatever is a piece of cake
https://groupe-sii.github.io/ogham/
Apache License 2.0
21 stars 15 forks source link

Configure different prefix/suffix for each lookup #1

Closed aurelien-baudet closed 7 years ago

aurelien-baudet commented 9 years ago

Currently, prefix and suffix is the same for all lookup resolvers. It may be useful to be able to handle different prefix/suffix in order to always name the template the same way independently on where the template is stored.

For example, the file is available in the classpath (/template/hello.html) in development. It is also available on the file system (/opt/myapp/template/hello.html) in production. The general suffix could be set to ".html". But the prefix is different for classpath resolver ("/template/") and file resolver ("/opt/myapp/template/").

Moreover, the prefix/suffix should be different according to the type of message in order to place templates in different folders for example (mails, sms, ...)

aurelien-baudet commented 9 years ago

Prefix/suffix for each kind of messages is implemented