• Publisert
  • 1 min

Find recently changed pages

How to find the most recently changed pages in EPiServer.

Today I stumbled over an undocumented feature in EPiServer CMS: RecentlyChangedPagesFinder

My mission was to make some sort of superlist with data from Twitter, Facebook and the latest changed pages from EPiServer.

The solution was to add EPiServer.Cms.Schell.UI.dll to my project and use the following code:

IEnumerable<RecentlyChangedPage> recentChanges = new RecentlyChangedPagesFinder().Find(10);

If you want to get changes for a specific user:

IEnumerable<RecentlyChangedPage> recentChanges = new RecentlyChangedPagesFinder().Find(10, "username");

This method uses the ChangeLog functionality introduced in CMS 6.