PersonalizedPages in CMS 5?

Vote:
 

In our 4.62 site we have a function which keep track if a user had read a page(news) or not. I'm trying make the same functionallity in CMS 5. But I haven't figured out how to store or retrieve personalized data in CMS 5 R2. Any ideas on how I could solve this?

/Markus


This is how it looks like in 4.62:

Default.aspx.cs

protected void Page_Load(object sender, System.EventArgs e)
{
try
{
PersonalizedData.Current["PageRead", CurrentPageLink] = true;
}
catch(Exception){}

Page.aspx.cs

protected void Page_Load(object sender, System.EventArgs e)
{
PersonalizedData.Current["PageRead", CurrentPageLink] = true;
}

#29966
May 25, 2009 13:50
Vote:
 

The equivalent in CMS 5 is the EPiServer.Personalization.EPiServerProfile class, which makes use of the ASP.NET profile model.

This URL will get you started:
http://sdk.episerver.com/library/cms5/html/T_EPiServer_Personalization_EPiServerProfile.htm

Hope it helps,
/Marten

#29969
May 25, 2009 15:38
Vote:
 
I might be wrong here because I didn't check, but I don't think you can use the multi dimensional indexer [string, PageReference] with EPiServerProfile. EPiServerProfile derives from ProfileBase and Microsoft does not like multi dimensional indexers (that is, FxCop does not permit them).
#29975
May 26, 2009 7:20
* 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.