Knowledge Base Tool

FraserKeddie
Teilnehmer/-in

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

lösung

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 Akzeptierte Lösungen
Whathcock
Lösung
Stratege/Strategin | Diamond Partner
Stratege/Strategin | Diamond Partner

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

lösung

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.

Lösung in ursprünglichem Beitrag anzeigen

FraserKeddie
Lösung
Teilnehmer/-in

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

lösung

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

 

Lösung in ursprünglichem Beitrag anzeigen

4 Antworten
LLuik
Teilnehmer/-in

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

lösung

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
Lösung
Teilnehmer/-in

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

lösung

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
Lösung
Stratege/Strategin | Diamond Partner
Stratege/Strategin | Diamond Partner

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

lösung

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
Teilnehmer/-in

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

lösung

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