Forum Discussion

ttadej's avatar
ttadej
Advisor
8 years ago

Issues using .split() and .get(index) in Velocity email templates

We're add UTM tags to links in our email templates and need to split the post URL into 2 parts so it can be rendered as follows: Example: ${urlPath}?utm_tags#${urlHash} I've been unable to successf...
  • DougS's avatar
    8 years ago

    I believe you should be able to do something like this:

    #set ($splitPath = urlPath.split(","))
    #foreach ($path in $splitPath)
      ${path}
    #end

     -Doug