+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Last site update

Last site update

4 posts, 0 answered
  1. Hydo L
    Hydo L avatar
    98 posts
    Registered:
    31 Mar 2010
    24 Sep 2010
    Link to this post
    Hi All,
    Can any one tell me how can I display last site update on all the pages?
    Thanks,
    Hydo
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    24 Sep 2010
    Link to this post
    Hi Hydo,

    There are many parts that you could modify and the scope of "Last site update" is quite big. You can create a user control and drop it on your master pate(template). Then if you want to get last update date for pages or content items you can subscribe for Telerik.Cms.CmsManager.Executed and Telerik.Cms.Engine.ContentManager.Executed events of the managers that are used for pages and content manipulations inside Global.asax - Application_Start. Then, check for command names like "CreatePage", "UpdatePage", "Publish", "PublishNew", "DeletePage", "DeleteLanguageVersion" or "CrateContent", "UpdateContent", "DeleteContent"

    Telerik.Cms.CmsManager.Executed += new EventHandler<Telerik.ExecutedEventArgs>(CmsManager_Executed);
           Telerik.Cms.Engine.ContentManager.Executed += new EventHandler<Telerik.ExecutedEventArgs>(ContentManager_Executed);

    and get LastMofiedDate from the StagedVersion of ICmsPage or IContent object. You can persists the value in a text file or somewhere in a database table. Finally, your user control will read this date and display it on all pages.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Hydo L
    Hydo L avatar
    98 posts
    Registered:
    31 Mar 2010
    24 Sep 2010
    Link to this post
    Thanks for the reply!
    I need the last content publish date.
    How this can achieve?

    Regards,
    Hydo
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    24 Sep 2010
    Link to this post
    Hi Hydo L,

    Check for command name "Publish" in the Application_Start and get the IContent item. Then you can call StagedContent.DateModified to get the last modified date of this item.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered