November Happy Hour will be moved to Thursday December 5th.

Class ViewedCategoriesCriterion

A criterion that matches after visiting a page with a category.

Inheritance
System.Object
ViewedCategoriesCriterion
Namespace: EPiServer.Personalization.VisitorGroups.Criteria
Assembly: EPiServer.Cms.AspNetCore.dll
Version: 12.0.3
Syntax
[VisitorGroupCriterion(Category = "Site Criteria", Description = "Matches after visiting page with category", DisplayName = "Visited Category", LanguagePath = "/shell/cms/visitorgroups/criteria/categories", ScriptShellModuleName = "EPIServer.CMS.UI.VisitorGroups", ScriptUrl = "CriteriaEditors/dist/ViewedCategories.js")]
public class ViewedCategoriesCriterion : CriterionBase<ViewedCategoriesModel>, ICriterion, IGeneratesAdministrativeInterface

Constructors

ViewedCategoriesCriterion(IContentLoader, IStateStorage)

Creates a new instance of ViewedCategoriesCriterion

Declaration
public ViewedCategoriesCriterion(IContentLoader contentLoader, IStateStorage stateStorage)
Parameters
Type Name Description
IContentLoader contentLoader
IStateStorage stateStorage

Methods

IsMatch(IPrincipal, HttpContext)

Matches after the user has visited a page with one of the selected categories.

Declaration
public override bool IsMatch(IPrincipal principal, HttpContext httpContext)
Parameters
Type Name Description
System.Security.Principal.IPrincipal principal
Microsoft.AspNetCore.Http.HttpContext httpContext
Returns
Type Description
System.Boolean
Overrides
EPiServer.Personalization.VisitorGroups.CriterionBase<EPiServer.Personalization.VisitorGroups.Criteria.ViewedCategoriesModel>.IsMatch(System.Security.Principal.IPrincipal, Microsoft.AspNetCore.Http.HttpContext)

Subscribe(ICriterionEvents)

Subscribes to the VisitedPage event.

Declaration
public override void Subscribe(ICriterionEvents criterionEvents)
Parameters
Type Name Description
ICriterionEvents criterionEvents
Overrides
EPiServer.Personalization.VisitorGroups.CriterionBase<EPiServer.Personalization.VisitorGroups.Criteria.ViewedCategoriesModel>.Subscribe(EPiServer.Personalization.VisitorGroups.ICriterionEvents)

Unsubscribe(ICriterionEvents)

Unsubscribes from to the VisitedPage event.

Declaration
public override void Unsubscribe(ICriterionEvents criterionEvents)
Parameters
Type Name Description
ICriterionEvents criterionEvents
Overrides
EPiServer.Personalization.VisitorGroups.CriterionBase<EPiServer.Personalization.VisitorGroups.Criteria.ViewedCategoriesModel>.Unsubscribe(EPiServer.Personalization.VisitorGroups.ICriterionEvents)

Implements

Extension Methods