How can i get a more shorter version of a dynmaic product name in the subject line
for example the product name is IBD hair growth , shampoo long
i want it to be shorten to IBD hair growth
i have been trying to use this placeholder, but nor really working the way i want
{{ event.Name |split:"|"|first|default:'item you needed' }}!
your feedback will be greatly appreciate
shorten dynamic product name

Best answer by Byrne C
Hi
While shortening a dynamic variable to a certain number of words is unfortunately not possible at this moment, you can shorten it to a certain number of characters with the |truncate: filter. Since IBD hair growth has 15 characters, you can add |truncate:15 at the end of a variable, and it will make sure that variable is no longer than 15 characters. Note that this will add an ellipsis (. . .) at the end of the string, so you may or may not want to use this.
Using this filter would turn your variable into {{ event.Name|truncate:15|default:'item you needed' }}
Let me know if this helps, or if I can answer any additional questions!
-Byrne
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.