SaaS CMS has officially launched! Learn more now.

Class FilterForVisitor

A filter that removes any pages that the current user does not have access to or that is not currently published.

Inheritance
System.Object
FilterForVisitor
Namespace: EPiServer.Filters
Assembly: EPiServer.Cms.AspNetCore.Templating.dll
Version: 12.0.3
Syntax
public static class FilterForVisitor : Object
Remarks

Even though the page is in published status the filter will also remove any pages that does not meet the requirements for start and stop publish dates.

Methods

Filter(IEnumerable<IContent>)

Filters the specified content items, removing those that should not be shown to the current user.

Declaration
public static IEnumerable<IContent> Filter(IEnumerable<IContent> contentItems)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IContent> contentItems

The content items that should be filtered.

Returns
Type Description
System.Collections.Generic.IEnumerable<IContent>

Content available for the current user.