Copy link to clipboard
Copied
Is there a tag for displaying the current year? For example, the copyright year? I want to put this into the site map (I guess) so it appears on each page's footer.
With the addition of Liquid you can easily accomplish this using:
{{ globals.site.dateNow | date: "yyyy" }}
Please check the documentation for more on what you can achieve with Liquid:
Copy link to clipboard
Copied
You can get the whole date:
Displays today's date; for example, November 23, 2005
But not jus the year.
Copy link to clipboard
Copied
This is a javascript/jQuery based solution that we've been using.
In a content holder at the foot of the page:
<p class="copyright">© <noscript>2012</noscript><span id="copyrightYear"> </span>Company Name</p>
and then in your scripts file (as part of the document ready function)..
var yearNow = new Date().getFullYear();
$('#copyrightYear').html(yearNow);
I'm sure you could also do this with out needing jQuery. The noscript will display if the user has javascript turned off, but the majority of the time the year will be set by the script
Copy link to clipboard
Copied
Pretty easy to break up a site into a good Template structure with elements such as the footer content elements like this as content holders which the client can change and change site wide as well. Which is what we do.
For say a set of footer elements you build that with a web app and one web app item which allows the client more finate one location content control.
Copy link to clipboard
Copied
I really am a newbie here. How do I do the document ready function? where do I put it and how do I do the script?
Copy link to clipboard
Copied
You will also need to have jquery installed etc.
I wrote a guide in jQuery here:
http://forums.adobe.com/docs/DOC-1721
But if you not sure about jQuery and JavaScript maybe you should look to the other options.
Copy link to clipboard
Copied
This seems to be dependant on the clients machine not the server time...?
I was able to change the date displayed by changing it windows...
Copy link to clipboard
Copied
It will do.
If you want server date there is no server date. You will need to use where your located and GMT time as the reference source, heaps of scripts, JSON, XML feeds for this around the web.
Copy link to clipboard
Copied
With the addition of Liquid you can easily accomplish this using:
{{ globals.site.dateNow | date: "yyyy" }}
Please check the documentation for more on what you can achieve with Liquid: