Recent searches


No recent searches

Guide Article - Displaying First Publish Date & Last Update Date

Answered


Posted Aug 25, 2022

I am trying to have the article to display both the first publish date and the last update date, But I do not seems to be able to do so, Ive tried to use / adjust the coding with reference to Tip: Display article revision date instead of publication date.

I've manage to hide it completely or change the fonts, which is not really what i wanted. 

Thanks 


0

5

5 comments

image avatar

Ifra Saqlain

Zendesk LuminaryMost Engaged Community Member - 2022Most Engaged Community Member of The Year - 2021Community Moderator

Hey Vicky, you just need to modify your meta tag code at artcle-Page.hbs file.

i). Go to your article page.

ii). Find for the <ul class="meta-group">.

Default code:

{{#is article.created_at article.edited_at}}
<li class="meta-data">{{date article.created_at timeago=true}}</li>
{{else}}
<li class="meta-data">{{date article.edited_at timeago=true}}</li>
<li class="meta-data">{{t 'updated'}}</li>
{{/is}}

Screenshot for the same:









Updated code:

<li class="meta-data">{{t 'created'}}</li>
<li class="meta-data">{{date article.created_at format='medium'}}</li>
              
<li class="meta-data">{{t 'updated'}}</li>
<li class="meta-data">{{date article.edited_at format='medium'}}</li>

Screenshot for the same:





Output:


 

 

To change date format, update the format in the helper:

<li class="meta-data">{{date article.created_at format='medium'}}</li>




 

 

Thanks

Team

4


It works exactly how I wanted ! Thank you so much ! 

0


image avatar

Ifra Saqlain

Zendesk LuminaryMost Engaged Community Member - 2022Most Engaged Community Member of The Year - 2021Community Moderator

Cheers!

0


Hi, I'm sorry, but why does this have to be so complicated?? We shouldn't have to deal with code to simply display a revision date. You could add a button to ask if we want to display a new date, etc. I find this to be a big inconvenience, and for the amount of questions you've received pertaining to this topic, you should have changed it by now. This is in no way helpful for someone who just manages articles.

2


is the “Created” date the initial Publishing date? or is it the date the article was created in draft?
If the latter then the actual initial publishing date could be days, weeks, months later than the initial creation date in draft, depending on when you want to publish initially.

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post