Re: Get Current year in Copyright Footer of Template

Mahati_Rapol
Level 2

Get Current year in Copyright Footer of Template

I am trying to add this -" <?php echo date("Y"); ?> " for our Copyright be upto date in the footer of our Landing page templates.

Here is where I am inserting the php code : 


<div id="footer">
  <p id="copyright">© 2006-<?php echo date("Y"); ?> Sample, Inc. | 12 Google Drive etc ...</p>
 </div>

When I am trying to save the template, Auto Save comes back as Error. 


Any suggestions.
Mahati Rapol
Tags (1)
5 REPLIES 5
Anonymous
Not applicable

Re: Get Current year in Copyright Footer of Template

I was trying to do the same thing and also received an error when inserting te PHP code. This should really be a Token option.

I ended up creating a Snippet with the date hard-coded. Still good for another 11 months at this point 😉
Mahati_Rapol
Level 2

Re: Get Current year in Copyright Footer of Template

I did the same too for now. But we have lot of templates and hundereds of landing pages which need to be approved manually. 
Would be great if this was working.
Mahati Rapol
Anonymous
Not applicable

Re: Get Current year in Copyright Footer of Template

Marketo does not allow PHP code insertion. Use Javascript instead: http://stackoverflow.com/questions/4562587/shortest-way-to-print-current-year-in-javascript
Anonymous
Not applicable

Re: Get Current year in Copyright Footer of Template

Jason is right on- PHP code is server side and isn't something we can support safely within landing pages. Javascript ior a token is the way to go here.
Nadine_Regan1
Level 2

Re: Get Current year in Copyright Footer of Template

I have come across the same issue and found this discussion. I tried adding the script but I am getting an error message from MKTO saying that this is not allowed. Maybe it worked at some point and not anymore. It seems MKTO has system tokens for everything BUT the current year.