Recent searches
No recent searches
Dynamic Years Using Liquid Markup
Answered
Posted Nov 10, 2023
I have a team with a macro that always references next year, and they have to manually go in there once a year and increment by 1. Is there a way to capture the current year, add one, and that macro is evergreen now?
0
1
1 comment
Jacob the Moderator
Hi Chris Gregory 👋
You sure can! I'm not a Liquid Markup expert, but have managed to get something working for your use case.
Below, I'm using the {{ticket.updated_at_with_timestamp}} placeholder that captures the timestamp of the ticket update (using the macro) and isolates the first part - the year. If you want to capture the year of a different event, like ticket creation, then you can use {{ticket.created_at_with_timestamp}} to capture that - there are other options as well.
I hope this helps you out, let me know if you have questions.
0