November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Describing this could be little a bit hard. There are two concpets in EPiServer edit mode called "ImpersonatedVisitorGroupsById" and "ImpersonatedVisitorGroupsByName". This is used by EPiServer in edit mode, to allow editors to preview pages as viewed by particular Visitor Groups. By default in edit mode it ignores the IsMatch, but you have ability to see page in perspective of different "Visitor Group":
I know the concept it little a bit seems odd but correct in edit mode :) Hope it helped
Just in case this is EPiServer Code:
class EPiServer.Personalization.VisitorGroups.VisitorGroupRole
{
.....
public bool IsMatch(IPrincipal principal, HttpContextBase httpContext)
{
string[] strArray1 = httpContext != null ? httpContext.Items[(object) "ImpersonatedVisitorGroupsById"] as string[] : (string[]) null;
if (strArray1 != null)
return ((IEnumerable<string>) strArray1).Contains<string>(this.ID.ToString());
string[] strArray2 = httpContext != null ? httpContext.Items[(object) "ImpersonatedVisitorGroupsByName"] as string[] : (string[]) null;
if (strArray2 != null)
return ((IEnumerable<string>) strArray2).Contains<string>(this.Name);
bool isMatch = this.IsMatchCached(principal, httpContext);
this.AddVisitorGroupStatistics(isMatch, httpContext);
return isMatch;
}
.....
}
Thank you for clearing that up.
I feel its a little bit anoying that the block dissapears when I set a visitorgroup. Its correct while 'View as this visitorgroup', the block is displayed as expected.
I guess its the best option that the editorview displays all content with no visitorgroups attached.
I'm testing out 'Mobile Visitor Group criteria for EPiServer http://azanganeh.com/blog/2016/10/17/mobile-visitor-group-criteria-for-episerver/ an It works well on the website.
But in editorview and preview the block is hidden.
Why is editorview behaving different than the website? What can I do to make the editorview behave as expected? Not hide the block while visitorgroup 'desktop' is added.