Easy way to get year into email template? | Community
Skip to main content
gkrajeski
Level 10
January 28, 2016
Solved

Easy way to get year into email template?

  • January 28, 2016
  • 1 reply
  • 2309 views

Rather than updating a common footer in an email template, is there any way to programmatically use the system's or client's current year?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Aslihan_Ayan_Ha

No, you'll still have to update it but the beauty of tokens is that changing them doesn't require you to re-approve assets. 

You can create an email script for your emails and on your landing pages put in javascript if you're familiar with coding.


I did this as my first velocity scripting. I used email script token at the parent folder. The code was :

#set ($year = ${system.Date})

©$date.get('yyyy') Demand Spring, 148 Lanigan Crescent Ottawa, ON, Canada K2S 1G9

One less thing to remember to update at the end of the year.

1 reply

Robb_Barrett
Level 10
February 1, 2016

Putting the year in as a token in your top level folder is the easiest way.

Robb Barrett
gkrajeski
gkrajeskiAuthor
Level 10
February 1, 2016

Would this be as a system year?

Robb_Barrett
Level 10
February 1, 2016

No, you'll still have to update it but the beauty of tokens is that changing them doesn't require you to re-approve assets. 

You can create an email script for your emails and on your landing pages put in javascript if you're familiar with coding.

Robb Barrett