Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I want to display last updated date in umbraco 4.7
Say if i even make a small change in content from the admin panel, it has to pull the updated date so that i can show that in footer of the website dynamically.
Thanks.
1) Create a property to store the last updated date, you can add it to Root item
2) Handle the content update event(i.e New, Save, Delete..). Create a class that inherit from ApplicationBase.
public class SaveUpdateDate : ApplicationBase { public SaveUpdateDate() { Document.New += new Document.NewEventHandler(Document_New); Document.AfterSave += new Document.SaveEventHandler(Document_AfterSave); } void Document_AfterSave(Document sender, SaveEventArgs e) { //Save } void Document_New(Document sender, umbraco.cms.businesslogic.NewEventArgs e) { } }
Another option is traverse all the node to find the latest updated date.
Hi thanks for the reply,
I'm just a beginner in umbraco.. can you exactly tel me how to add the property to root item.. and where do i add this code??
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Show last updated date in umbraco
I want to display last updated date in umbraco 4.7
Say if i even make a small change in content from the admin panel, it has to pull the updated date so that i can show that in footer of the website dynamically.
Thanks.
1) Create a property to store the last updated date, you can add it to Root item
2) Handle the content update event(i.e New, Save, Delete..). Create a class that inherit from ApplicationBase.
Hi thanks for the reply,
I'm just a beginner in umbraco.. can you exactly tel me how to add the property to root item.. and where do i add this code??
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.