KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: HappyHippo on April 04, 2016, 10:00:48 am

Title: How to access passed custom information to the Velocity template
Post by: HappyHippo on April 04, 2016, 10:00:48 am
Hello Guys;
I have passed NameValue object to EmailOptionsIf but i don't know how to get values in velocity template...please help

NameValue[] nm= new NameValue[1];
nm[0] = new NameValue("nm1", "Value1");

EmailOptionsIf options = new EmailOptions();
options.setTemplateName("custom-template");
options.setCountryCode("en");
options.setCustomAttrs(nm);
kkEng.getEng().sendTemplateEmailToCustomer1(70, "Test -- Alert from Action", options); 

How to access NameValue object nm1 values  in velocity template?

Thank you!
Title: Re: How to access passed custom information to the Velocity template
Post by: Brian on April 04, 2016, 12:42:27 pm
Hi HappyHippo,

Simply use $nm1 in your template.

Title: Re: How to access passed custom information to the Velocity template
Post by: HappyHippo on April 05, 2016, 11:55:02 am
Got it  :)

Thank you Brian!