Forum Discussion
Chayce,
Any thoughts on my secondary issue above? No matter what I do (text or HTML) I am getting linefeeds that I do not want.
HTML
Text is even worse
This all appears to associated with the IF/Else statements
further down the email, it functions properly with <br> and single linefeeds
------------------------------
Thank you so much,
v/r,
Chuck
------------------------------
I've noticed that if the line is blank other than the line break tag, it won't work. But, if I add the line breaks at the end of a previous non-empty line, it works fine.
For example,
You recently added a calendar event for Training. <br><br>
Dates: ....
will work but this will not:
You recently added a calendar event for Training.
<br><br>
Dates: ....
------------------------------
Katlyn Allen
kallen@eatatjacks.com
------------------------------
- CharlesDulaney5 months agoQrew Member
What I ended up doing is a combination of tactics by Chayce, Doug and yourself to get the email that I wanted,
You recently added a calendar event for {{a.category}}.<br><br>
Dates: {{a.startend}}<br>
{# Duration between 2 dates -#}
{% if a.duration|int > 86400000 -%}
Duration: {{(a.duration|int / 86400000)|int}} Days<br>
{% elif a.duration|int==86400000 -%}
Duration: {{(a.duration|int / 86400000)|int}} Day<br>
{% else -%}
No Duration<br>
{% endif -%}
{# PTO Hours -#}
{% if a.pto_hours==1 -%}
PTO Hours Used: {{a.pto_hours|int}} hr<br>
{% elif a.pto_hours>1 -%}
PTO Hours Used: {{a.pto_hours|int}} hrs<br>
{% else -%}
No PTO Hours Used<br>
{% endif -%}
Creator: {{a.rec_creator}}<br>
New Owner: {{a.new_rec_owner}}<br><br>
Rec Log: {{a.log}}<br><br>
////////////////////////
Email
///////////////////////
You recently added a calendar event for Training.
Dates: (01-13-2024) - (01-14-2024)
Duration: 2 Days
No PTO Hours Used
Creator: xxxxxx yyyyyy
New Owner: aaaaa bbbbb
Rec Log: Record owner changed from xxxxxxx yyyyy to aaaa bbbbb