Class FilterContentForVisitor
A filter that removes any content that the current user does not have access to or that is not currently published or there is no defined render or not existed in current view language for the content
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Filters
Assembly: EPiServer.dll
Version: 7.19.2Syntax
public class FilterContentForVisitor : IContentFilter
Remarks
Even though the content is in published status the filter will also remove any contents that does not meet the requirements for start and stop publish dates. Even the content has not defined template
Constructors
FilterContentForVisitor()
Initializes a new instance of the FilterContentForVisitor class.
Declaration
public FilterContentForVisitor()
Remarks
By Default filter if the content is Published, has Read access rights and there is a valid webform render
FilterContentForVisitor(FilterPublished, FilterAccess, FilterTemplate)
Initializes a new instance of the FilterContentForVisitor class.
Declaration
public FilterContentForVisitor(FilterPublished filterPublished, FilterAccess filterAccess, FilterTemplate filterTemplate)
Parameters
Type | Name | Description |
---|---|---|
FilterPublished | filterPublished | The filter published. |
FilterAccess | filterAccess | The filter access. |
FilterTemplate | filterTemplate | The filter template. |
FilterContentForVisitor(TemplateTypeCategories, String)
Initializes a new instance of the FilterContentForVisitor class.
Declaration
public FilterContentForVisitor(TemplateTypeCategories templateTypeCategories, string tag)
Parameters
Type | Name | Description |
---|---|---|
TemplateTypeCategories | templateTypeCategories | The template type categories. |
System.String | tag | The tag used to select template |
Remarks
Filter if the content is Published, has Read access rights and there is a valid render for the specific templateTypeCategories
Methods
Filter(IList<IContent>)
Filters the specified contents.
Declaration
public virtual void Filter(IList<IContent> contents)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<IContent> | contents | The contents. |
Filter(Object, ContentFilterEventArgs)
Eventhandler that applies the filter for contents.
Declaration
public void Filter(object sender, ContentFilterEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The class/instance that initiated the Filter event. |
ContentFilterEventArgs | e | The see cref="EPiServer.Filters.FilterEventArgs"/> arguments containing the event data. |
ShouldFilter(IContent)
If the content should be filtered.
Declaration
public bool ShouldFilter(IContent content)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | The content. |
Returns
Type | Description |
---|---|
System.Boolean | True if the filter will remove the page; otherwise false. |