Forum Discussion

lc-garcia's avatar
11 years ago

Email template context object lowercase

Hi there,

 

I've been trying to have the following sentence working

 

${subscription.localizedObjectType?lower_case}:

 

in an email template (just liek stated at http://freemarker.org/docs/ref_builtins_string.html#ref_builtin_lower_case), but the syntax seems to break the code.

 

Has anyone tried (and succeeded) on something like this?

 

Gracias,

Luis

  • The email templates are one of the last holdovers from the days when Lithium used Apache Velocity (before freemarker) and so still use velocity syntax (instead of freemarker).  With Velocity, you just use the java String methods, so in this case you could do this:

     

    ${subscription.localizedObjectType.toLowerCase()}

     

  • DougS's avatar
    DougS
    Khoros Oracle

    The email templates are one of the last holdovers from the days when Lithium used Apache Velocity (before freemarker) and so still use velocity syntax (instead of freemarker).  With Velocity, you just use the java String methods, so in this case you could do this:

     

    ${subscription.localizedObjectType.toLowerCase()}

     

    • lc-garcia's avatar
      lc-garcia
      Guide

      Hi  DougS 

       

      Do you know how can I review the array of values for variables like the one discussed below?

       

      Gracias,

      Luis

  • Hi,

     

    This wont directly help "sorry" in advanced however i wanted to share your frustration. I have had similar issues with email templates with other edits i have made, in general i have found the templates very temperamental, i gave up in the end as i was only playing with something however i do have it on my radar to update all ours before April, not looking forward to it...

     

    Good luck getting this sorted !

    • lc-garcia's avatar
      lc-garcia
      Guide
      Hey, thanks for taking the time to look at this. In case you need it, @DougS's suggestion below worked pretty well.