Solved
Forum Discussion
ttadej
9 years agoAdvisor
Thanks DougS
We ended up doing this, which seems excessive but worked:
#set ($postUrl = $notification.message.webUi.url)
#if ($postUrl.contains('#'))
#set ($splitPostUrl = $postUrl.split('#'))
#foreach ($part in $splitPostUrl)
#if ($velocityCount == 1)
#set ($urlPath = $part)
#elseif($velocityCount == 2)
#set ($urlHash = $part)
#end
#end
<a href="$!{urlPath}?${utmTag}#$!{urlHash}">
#else
<a href="${postUrl}?${utmTag}">
#endThis isn't much documentation here: https://velocity.apache.org/engine/1.5/user-guide.html#loops
Unfortunately $arr.get(index) does not seem to work even though Lithium is using Velocity v1.5
Inactive User
5 years agottadej Does your code work? I have tried it in one of our emails and it isn't working as I would expect. Did you change anything in it?