I was having some trouble getting this library to work with templates that were using handlebars for Mandrill.
After looking into the issue, it seems like the root of the issue is that Handlebars expects the variables to be structured slightly differently from the way gochimp is structuring them.
As mentioned in the blog post, a handlebars template expects pure key/value pairs to be in global_merge_vars, and expects {email: {key: value}} pairs for the merge_vars paramater.
Whereas the TemplateRender in gochimp seems to hand off two paramaters, content and merge_vars, both of which are simple key/value pairs.
(This is my best estimation as to why I was getting blank variables in my templates, and will be investigating further in the next few days, but the above seems like it could be the root of the issue).
I was having some trouble getting this library to work with templates that were using handlebars for Mandrill.
After looking into the issue, it seems like the root of the issue is that Handlebars expects the variables to be structured slightly differently from the way gochimp is structuring them.
As mentioned in the blog post, a handlebars template expects pure key/value pairs to be in
global_merge_vars, and expects{email: {key: value}}pairs for themerge_varsparamater.Whereas the
TemplateRenderin gochimp seems to hand off two paramaters,contentandmerge_vars, both of which are simple key/value pairs.(This is my best estimation as to why I was getting blank variables in my templates, and will be investigating further in the next few days, but the above seems like it could be the root of the issue).