transparent
Programmer
I am about to add a newsletter system to my website.
Emails are also generated through out the site.
I want to update this so that the emails use templates so that the format of the emails can be easily controlled and edited.
Does anybody know of any existing templating systems?
If I cant find one iwas going to implement it in the following manner:
1) Template class loads the template txt file
2) Parses it for placeholders i.e. <name> or <address>
3) The Template object will then populate an internal hashtable collection with these placeholder keys.
4) The developer can then populate fill the collection key by key
5) The .Generate method then replaces each placeholder in the template with the passed value. It then returns the populated template.
Does this seem like a good approach. What other functionality should I provide?
Emails are also generated through out the site.
I want to update this so that the emails use templates so that the format of the emails can be easily controlled and edited.
Does anybody know of any existing templating systems?
If I cant find one iwas going to implement it in the following manner:
1) Template class loads the template txt file
2) Parses it for placeholders i.e. <name> or <address>
3) The Template object will then populate an internal hashtable collection with these placeholder keys.
4) The developer can then populate fill the collection key by key
5) The .Generate method then replaces each placeholder in the template with the passed value. It then returns the populated template.
Does this seem like a good approach. What other functionality should I provide?