Try our conversational search powered by Generative AI!

Filter list of visitor groups

Vote:
 

Hi there,

When I drag and drop an item into a content area and then I click on personalize it'll display a pop-up with all visitor groups in the system. My question is, is there a way to filter these groups during runtime? I want to filter based on a property in a page.

Thank you!

#231463
Nov 28, 2020 0:15
Vote:
 

Hello Anthony,

Yes, it is possible.

You would have to register and intercept your own decorator for IVisitorGroupRepository that would first call the base IVisitorGroupRepository.List method and then run custom filtering on the result.

Example of an interceptor here: https://github.com/episerver/EPiServer.Labs.BlockEnhancements/blob/b3b73eafa1da662f2c7ac2ba0f0870307cf1e6f3/src/EPiServer.Labs.BlockEnhancements/ContentDraftView/ContentDraftViewInitializer.cs#L14

#232696
Dec 02, 2020 11:39
Vote:
 

Thank you @Bartosz!

#232968
Dec 02, 2020 17:34
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.