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
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Filters
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7Syntax
public static class FilterForVisitor
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(PageDataCollection)
Filters the specified pages, removing those that should not be shown to the current user.
Declaration
public static PageDataCollection Filter(PageDataCollection pages)
Parameters
Type | Name | Description |
---|---|---|
PageDataCollection | pages | The pages that should be filtered. |
Returns
Type | Description |
---|---|
PageDataCollection | A collection of filtered pages. |
Remarks
The PageDataCollection that is sent in to the method is also filtered.
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. |