Macro text based on day of the week
AnsweredHi there,
We were wondering if it's possible to end an e-mail with 'Have a good day!' or 'Have a good weekend' based on the day of the week? We would like to implement this within some of our macro's. So:
Monday to Thursday: 'Have a good day!'
Friday to Sunday: 'Have a great weekend!'
Thanks in advance for your input! :)
Kindest regards,
Joris
-
You should be able to get something to work using liquid. https://support.zendesk.com/hc/en-us/articles/203662146-Understanding-Liquid-markup-and-Zendesk-Support
-
Joris
You can try...
{% assign day = 'now' | date:'%u' | plus: 0 %}
{% if day >= 6 %}
Have a great Weekend!
{% else %}
Have a great day!
{% endif %}
-
Thanks Graeme, was hoping someone would jump in with a full solution.
-
Hi Andrew and Graeme,
This is great, thanks a lot!
-
Hello, out of curiosity, would there also be a code for the type of day of the week? Ex. How are you this Monday? I like this preference since it has a more personal touch. Thanks in advance!
-
Hi there Nathan,
Thanks for reaching out. With regard to your query, this is out of our scope, but you may learn more on custom placeholders via https://shopify.github.io/liquid/.
Please sign in to leave a comment.
6 Comments