Reporting on page history, reviewed and last updated
We've had a request from our marketing depart asking the following:
"Can you guys write a report to show when the last time pages were reviewed/updated on Sitefinity"
I'm assuming there is nothing out the box so would anyone know of the sql to give me something like that?
Any help gratefully appreciated.
Hi Richard,
If you would like to get the date when the content of a page has been last modified you need to get the page data and then get the LastModified property using the API.
Here is an example:
PageManager pageManager = PageManager.GetManager();
PageNode pageNode = pageManager.GetPageNodes().Where(n => n.Title ==
"YourPageTitle"
).FirstOrDefault();
// when the page node
// (the Titles and Properties of a page) has been last modified
var lastDateModified = pageNode.LastModified;
PageData pageData = pageManager.GetPageData(pageNode.Id);
// when the page data (the content) has been last modified
var pageDataLastModified = pageData.LastModified;
Hello Sabrie
Thank you very much for this information, it is gratefully received.
Rich