Suggested method to use two velocity variable one in template level that will help to control the output but my purpose is to allow edit the variable value in email level as it offer when we create local variable in email template.
Although, velocity token can control output but not allow to edit variable at email level. To edit velocity variable value need to change the velocity token value each time which I want to avoid this limitations here.
Suggested method to use two velocity variable one in template level that will help to control the output but my purpose is to allow edit the variable value in email level as it offer when we create local variable in email template.
Although, velocity token can control output but not allow to edit variable at email level. To edit velocity variable value need to change the velocity token value each time which I want to avoid this limitations here.
It doesn't sound like you fully understood the setup.
The template would look like this:
{{my.beginConditionalOutputOrComment}}
<a href="http://www.mywebsite.com?parameter=${email_variable}">read more</a>
{{my.endConditionalOutputOrComment}}
- The first Velocity token starts an #if condition
- The second Velocity token #ends the #if condition.
- So whether the variable is output is controlled by Velocity — controlled by whether the condition matches.
- The value of the variable is still edited in the usual way.
This is actually a springboard to the much more advanced method I use myself, but you have to be an expert Velocity developer to implement and support that method in production.