Knowledge Base Tool

FraserKeddie
参加者

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

解決

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件の承認済みベストアンサー
Whathcock
解決策
トップ投稿者

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

解決

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

Whitney Hathcock
 HubSpot Community Champion
Found my comment helpful? Great! Please mark it as a solution to help other community users.

元の投稿で解決策を見る

FraserKeddie
解決策
参加者

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

解決

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

 

元の投稿で解決策を見る

4件の返信
LLuik
参加者

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

解決

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

 

FraserKeddie
解決策
参加者

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

解決

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
解決策
トップ投稿者

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

解決

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

Whitney Hathcock
 HubSpot Community Champion
Found my comment helpful? Great! Please mark it as a solution to help other community users.
FraserKeddie
参加者

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

解決

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