Knowledge Base Tool

FraserKeddie
Participant

Adding a 'last edited' date/time at the top of an article

SOLVE

Hi, 

 

I am looking to add a date (and possibly time) at the top of a Knowledge Base article so the user can see when it was last edited or updated. Since it appears this functionality does not exist, it may be this needs to be javascript or a job for a developer. 

Does anyone have any experience with this?

 

Thanks. 

2 Accepted solutions
Whathcock
Solution
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Adding a 'last edited' date/time at the top of an article

SOLVE

Hi @FraserKeddie ,

 

I found this article , and this community post that details a snippet of code you can add to include an "updated date" on a HubSpot blog post -- I'm wondering if the same would work for Knoweldge Base articles?

 

Hope this helps! If it did, please help the community by marking this as a solution.

 

Whitney

 

signature.png

Found my comment helpful? Great! Please mark it as a solution to help other community users.

View solution in original post

FraserKeddie
Solution
Participant

Adding a 'last edited' date/time at the top of an article

SOLVE

Hi @Whitney 

Thank you for the help! The solution was to copy the code from the article you shared directly into the Knowledge Base article. I had some help from a developer who opened my eyes to a multitude of other formatting possibilities which I had until now struggled with in HubSpot. 

 

These links may also prove useful for other people:
https://developers.hubspot.com/docs/cms/hubl#hs_cos_wrapper_widget_2878117828
https://developers.hubspot.com/docs/cms/hubl/filters

 

View solution in original post

4 Replies 4
LLuik
Participant

Adding a 'last edited' date/time at the top of an article

SOLVE

Hi there - 

 

To include the date on your articles, you can follow these steps. Please note that currently, there isn't a way to apply this change universally to all articles, so you'll need to add the code individually for each one.

 

  1. Access the edit article area for the specific article where you want to add the time stamp.

  2. Click on the 'Insert' option, followed by 'Embed.'

  3. Insert the following code: <p style="font-style: italic; color: #555555; font-size: 11px;">Last Updated: {{ content.updated|datetimeformat('%B %e, %Y') }}</p>.  This code includes a style that makes the text smaller and lighter in color (refer to the screenshot below).

LLuik_0-1686144317275.png

 

0 Upvotes
FraserKeddie
Solution
Participant

Adding a 'last edited' date/time at the top of an article

SOLVE

Hi @Whitney 

Thank you for the help! The solution was to copy the code from the article you shared directly into the Knowledge Base article. I had some help from a developer who opened my eyes to a multitude of other formatting possibilities which I had until now struggled with in HubSpot. 

 

These links may also prove useful for other people:
https://developers.hubspot.com/docs/cms/hubl#hs_cos_wrapper_widget_2878117828
https://developers.hubspot.com/docs/cms/hubl/filters

 

Whathcock
Solution
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Adding a 'last edited' date/time at the top of an article

SOLVE

Hi @FraserKeddie ,

 

I found this article , and this community post that details a snippet of code you can add to include an "updated date" on a HubSpot blog post -- I'm wondering if the same would work for Knoweldge Base articles?

 

Hope this helps! If it did, please help the community by marking this as a solution.

 

Whitney

 

signature.png

Found my comment helpful? Great! Please mark it as a solution to help other community users.
FraserKeddie
Participant

Adding a 'last edited' date/time at the top of an article

SOLVE

Hi Whitney, 

 

Thanks! In the end I wrote this at the top of every article. 

 

Last updated - {{ content.updated|datetimeformat('%B %e, %Y') }}

 

Worked great. 

 

Fraser 

0 Upvotes