Try our conversational search powered by Generative AI!

New Page indicator



it's possible to know if a user has read/visited a page?


Sep 11, 2009 15:22


Could you explain what are you trying to achieve or what is your requirement?

Sep 11, 2009 15:59


i need to create a page that shows a list of all pages that the user has not yet read.

For example  news, articles etc.

i need also to show if "today" someone has published a new document, has changed a document,  ...




Sep 17, 2009 14:22


You would probably need to create a Session object of all the pages (just once on master page)

  PageDataCollection allPages = GetChildren(EPiServer.Core.PageReference.StartPage);
  Session["AllPages"] = allPages;


and then update this session object whenever user vists a page

 PageDataCollection allPages = (PageDataCollection)Session["AllPages"];

            for (int pageIndex = 0; pageIndex < allPages.Count; pageIndex++)

                PageData page = pages[pageIndex];

               //compare the current page id against the session pages

                if (page.PageLink.ID == CurrentPage.PageLink.ID)


            Session["AllPages"] = allPages;


In your listing control, you could always request it to dispay EPiServer PageList from the session object.


For your second request you have use UnifiedFile object to get the file and then access file properties to check its date properties.

For example, if you set a file URL property in the template, you can access it as below

string fileUrl = CurrentPage["FilePath"] as string;

UnifiedFile file = HostingEnvironment.VirtualPathProvider.GetFile(fileUrl) as UnifiedFile;


Hope it helps



Sep 17, 2009 15:30


but if i use a session object i store only the pages that the user has read in the current session.

I need to show the pages that the user has not read in "general".  Not only in the current session.


Sep 21, 2009 13:47


Then you have 2 options,

If you have to maintain over a long period of time, then you have to create a custom database tables and store the mapping. The mapping could be between username or IP address against the list of pages.

The other option would be to use cookies for mapping, but it would become difficult to manage and also wont work if someone has cookies disabled.



Sep 21, 2009 15:23


i know that it's possible to do it with coding and i thought do it approximately as you describe

But i wondered if there is a property in EpiServer that indicate if a user has read the page or not.


Sep 23, 2009 7:26
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.