Recent searches
No recent searches
Adding the article date to the Article List page
Answered
Posted Sep 15, 2021
I'm looking to add the article date to the Article List page in our help center. Any suggestions?
0
5
Recent searches
No recent searches
Posted Sep 15, 2021
I'm looking to add the article date to the Article List page in our help center. Any suggestions?
0
5 comments
Ifra Saqlain
Hi @Josh Thiessen,
you only need to add a helper after the article title, see in the below image how I did:
Code for the same:
Output is:
You can use the date format via https://developer.zendesk.com/documentation/help_center/help-center-templates/helpers/#date-helper
I). Short -
{{date created_at timeago=true format='short'}}
II). Medium-
{{date created_at timeago=true format='medium'}}
III). Medium-
{{date created_at timeago=true format='long'}}
Thanks
Team
1
System
@...
Hi Ifra, That's fantastic. The code you provided works exactly how i was hoping initially. I did run into an issue when I tried to add the medium-sized time stamp (Picture included).
do you know what I've done wrong?
Is it also possible to add "updated XXX months ago" instead of just "updated"?
I was messing around a little, but all the changes i made either had it look like my screenshot or nothing at all.
Thank you so much for the help so far :)
0
Ifra Saqlain
Hey,
You need to add the time format into the updated helper also, see the bold code-line, how I did-
The helper
<li class="meta-data">{{date edited_at timeago=true format='medium'}}</li>
shows last date when you have updated the article.
See in the below screenshot, I have updated my article today 17 sep 2021.
and I was created this article on 19 dec 2016
I think you should also try this, if you have any old article, take a screenshot and then update that old article, then compare the date.
also you can add the text for created article, see the bold code-line:
Output:
If any confusion, let me know :)
Thanks
Ifra
1
System
Works Great. Thank you!
0
Ifra Saqlain
Great!
0