This project is read-only.
All visitors automatically have an EPiServerProfile (accessible through EPiServer.Personalization.EPiServerProfile.Current). It's based on ASP.NET's profile store, and the properties stored for each profile is configured in the <Profile> section of Web.Config. This virtual role lets you identify which users have a certain setting in their profile.
If you have a web site that requires registration you might want to store peoples age, gender, affiliation, interests, company, industry and so on in their profile - all information that can be used to target personalized messages all through the web site.
The parameters are:
  • propertyname. The name of the profile property to check
  • condition. The name of the compare condition to check with as specified in EPiServer.Filters.CompareCondition. For instance "Contained", "Equal", "NotEqual", "GreaterThan", "LessThan", "StartsWith", "EndsWith" and so on. Note they are all case sensitive.
  • propertyvalue. The value to check for
  • caseinsensitive. Optional. Set true to make string comparisons case insensitive.

So far this role will work with the following data types: String, Boolean, Integer, Decimal, Double, DateTime and List<string>. For all other objects it will do a ToString() and compare the strings.
Here is how you would register it in <virtualRoles> in web.config:
<add name="EPiServerEmployee" type="EPiServer.Research.VirtualRoles.ProfileMatchRole, VirtualRolesSamplePack" propertyname="Email" propertyvalue="" condition="EndsWith" caseinsensitive="true"/>

Last edited Jan 15, 2010 at 7:14 PM by AllanThraen, version 1


No comments yet.