Recent searches
No recent searches
Any way to make year in the footer dynamic?
Posted Jan 28, 2025
Any way to make current year in the footer dynamic? Ideally without using JavaScript. Something like this:
{{date "" format="YYYY"}}
0
Recent searches
No recent searches
Posted Jan 28, 2025
Any way to make current year in the footer dynamic? Ideally without using JavaScript. Something like this:
{{date "" format="YYYY"}}
0
Zendesk uses web cookies to collect information about you when you visit our Site. This information might be about you, your preferences, or your device. At Zendesk, we may use this information for purposes that include ensuring basic functionality of our Sites; remembering user preferences, including your cookie preferences; measuring the effectiveness of our Sites, marketing campaigns, and email communications; and personalizing online content.
Please review the different category headings below to learn more and adjust the cookie settings on your current device. Please note that you will need to ensure that each web browser is adjusted to reflect your preferences if you use different computers or mobile devices.
For more information about how Zendesk uses web cookies, please see our Cookie Notice.
Essential cookies enable core site functionality. These cookies are necessary for the Site to function and cannot be switched off in our systems. You may set your browser to block or alert you about these cookies, but parts of the website may not function properly.
Functional cookies enable the Site to provide enhanced functionality and personalization. These cookies may be set by us or by third-party providers whose services we have added to our Site.
Analytics cookies allow us to count visits and traffic sources so we can measure and improve the performance of our Site. These cookies help us to know which pages are the most and least popular and see how visitors move around the Site.
Targeting cookies, such as social media cookies, may be set through our Site by our advertising service providers, third-party advertisers, ad networks, or data exchange partners. These cookies may be used to show you relevant advertising on other third-party sites.
2 comments
Erica Girges
Unfortunately, I'm not sure there's a way to change it dynamically without Javascript. If you could provide a little more context on your use case maybe I can elp provide an alternate solution.
0
Arthur Badin
Hey Erica,
We're using Help Center
.hbs
templates for the footer.Example:
I was wondering if there's a way to get the current year using the templating language. Right now, we have to update it manually every year.
I found the date helper, but I'm not sure how to use it to get the current year or can we format it to include only year.
One idea is to wrap the year in a <span> and update it dynamically using JavaScript, but that might cause a flash when the script runs. Is that the best approach, or is there a better way?
Thanks!
0