# Happy (day of the week) greeting in email

**URL:** <https://forum.mautic.org/t/happy-day-of-the-week-greeting-in-email/25231>\
**Category:** General Discussion\
**Created:** [August 30, 2022, 2:05pm UTC](https://forum.mautic.org/t/happy-day-of-the-week-greeting-in-email/25231 "2022-08-30T14:05:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![notsotechy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/notsotechy/32/8095_2.png) [@notsotechy](https://forum.mautic.org/u/notsotechy)\
**Post date:** [August 30, 2022, 2:05pm UTC](https://forum.mautic.org/t/happy-day-of-the-week-greeting-in-email/25231/1 "2022-08-30T14:05:24Z")

</div>

hi

I’d like to set up a dynamic content fiend that updates to the day of the week so i can insert it into emails, like this:

happy Monday… (if email goes out on a monday)  
or happy Tuesday (if the email goes out on a tuesday)

I set up a dynamic content field with this code:

```auto
<p style="box-sizing: border-box;">Happy <span id="today" style="box-sizing: border-box;">Tuesday</span>!</p>
<script style="box-sizing: border-box;">
	document.getElementById("today").innerHTML = new Date().toLocaleDateString('en-us',
	{
		weekday: "long",
	});

</script>

```

and it seems to be working, the field is updating, but how do I now insert this dynamic content field (which shows as ID 1) into my template email?

what token do I use?

thank you.

---

<div class="post-metadata">

**Author:** ![aussiemartin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aussiemartin/32/12191_2.png) [@aussiemartin](https://forum.mautic.org/u/aussiemartin)\
**Post date:** [July 16, 2024, 11:57pm UTC](https://forum.mautic.org/t/happy-day-of-the-week-greeting-in-email/25231/2 "2024-07-16T23:57:26Z")

</div>

Hi,  
Did you eventually get this to work?  
I’m looking to do the same but can find no references to do this using variables.

Anyone else can help solve this would be greatly appreciated

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [July 17, 2024, 6:50am UTC](https://forum.mautic.org/t/happy-day-of-the-week-greeting-in-email/25231/3 "2024-07-17T06:50:11Z")

</div>

Hello,

This is possible with the twigtemplates plugin:

> **[Twig Templates for Mautic - High level of personalization](https://mtcextendee.com/mautic-twig-templates-bundle/)**
>
> High level of personalization for your e-mails, landing pages and text messages using Twig syntax.

```auto
Tomorrow
{{ "now"|date_modify('+1 day')|date("m/d/Y") }}

Today
{{ "now"|date("m/d/Y") }}

Today is happy {{ "now"|date("l") }}

```

The last one will produce Today is happy MMonday for example.

Here is a snipplet library:

> **[Twig TemplatesSnippets Library](https://mtcextendee.com/mautic-twig-templates-bundle-snippets-library/)**
>
> High level of personalization for your e-mails, landing pages and text messages using Twig syntax.

---

<div class="post-metadata">

**Author:** ![aussiemartin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aussiemartin/32/12191_2.png) [@aussiemartin](https://forum.mautic.org/u/aussiemartin)\
**Post date:** [July 19, 2024, 3:57am UTC](https://forum.mautic.org/t/happy-day-of-the-week-greeting-in-email/25231/4 "2024-07-19T03:57:53Z")

</div>

ok thanks for pointing this paid plugin out.  
Is this yours or you’re associated with it?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [July 19, 2024, 2:12pm UTC](https://forum.mautic.org/t/happy-day-of-the-week-greeting-in-email/25231/5 "2024-07-19T14:12:57Z")

</div>

No, it’s not my plugin, I’m not associated any way.  
I just like this plugin and use it whereever I can.  
It let’s you fo abandoned cart content, dynamic content, etc.

---

<div class="post-metadata">

**Author:** ![aussiemartin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aussiemartin/32/12191_2.png) [@aussiemartin](https://forum.mautic.org/u/aussiemartin)\
**Post date:** [July 20, 2024, 12:50am UTC](https://forum.mautic.org/t/happy-day-of-the-week-greeting-in-email/25231/6 "2024-07-20T00:50:36Z")

</div>

ok all good anyway. great it’s working for you.  
my business partner forked an existing Github repo and we built our own Twig stuff that’s better suited to our needs, with spintax.  
Thanks for your help too. appreciated

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [July 20, 2024, 3:43pm UTC](https://forum.mautic.org/t/happy-day-of-the-week-greeting-in-email/25231/7 "2024-07-20T15:43:24Z")

</div>

Okay great.  
BTW - there is spintax built in 🙂

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [July 20, 2024, 3:44pm UTC](https://forum.mautic.org/t/happy-day-of-the-week-greeting-in-email/25231/8 "2024-07-20T15:44:15Z")

</div>

And the github repo is not free and open, so I’m not sure what you forked.  
Make sure it’s the twig templates plugin, not the advanced twig templates plugin. It’s different and they work 100% different.

---

<div class="post-metadata">

**Author:** ![aussiemartin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aussiemartin/32/12191_2.png) [@aussiemartin](https://forum.mautic.org/u/aussiemartin)\
**Post date:** [July 21, 2024, 7:24am UTC](https://forum.mautic.org/t/happy-day-of-the-week-greeting-in-email/25231/9 "2024-07-21T07:24:09Z")

</div>

The repo my business partner forked has nothing to do with the plugin you mentioned. It twig based.  
there is spintax built in too and now working merrily away 🙂
