Forum Discussion
DougS
11 years agoKhoros Oracle
Hi Ben,
Can you elaborate on how this broke the anchor tag on your email templates? Our email templates use Apache Velocity, so you can add variables, conditionals, etc. Not having seen exactly how the template broke, I've added a simple logic block that might be used (I haven't QAed this, so it might have a bug or 2 in the code) to append to the URL:
#set ($my_web_tracking_number = "13483648732823w648") #set ($notif_url = $notification.message.webUi.url) #set ($fragment = "") #if ($notif_url.contains("#")) #set ($fragment = $notif_url.substring($notif_url.indexOf("#"), $notif_url.length() -1)) #set ($notif_url = $notif_url.substring(0, $notif_url.indexOf("#"))) #end #if ($notif_url.contains("?")) #set ($notif_url = $notif_url + "&" + $my_web_tracking_number + $fragment) #else #set ($notif_url = $notif_url + "?" + $my_web_tracking_number + $fragment) #end
Hopefully that example helps. Here is a link to the velocity user guide page, which may help as a reference:
https://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html
-Doug
- benpiddington11 years agoHelperHi Doug.
Thank you very much for getting back to me. We were adding the parameter into the email as follows:
${notification.message.webUi.url}?smcid=mentions
So, having the parameter after the generated URL was stopping the anchor within the generated URL from working.
I'll give your example a try and will let you know if we have any success.
thanks again,
Ben
Related Content
- 2 years ago
- 2 years ago
- 2 years ago
- 2 years ago
- 2 years ago