NamespaceSystemLibrary.Common.Episerver.Extensions
Common content area extensions
ContentAreaExtensions
public static class ContentAreaExtensions
Inheritance
System.Object
ContentAreaExtensions
Common content area extensions
Returns true if the content area has at least 1 item that can be displayed for current user (filtered), else false
Type | Name | Description |
---|---|---|
EPiServer.Core.ContentArea | contentArea |
Type | Description |
---|---|
System.Boolean |
Returns true if the content area has at 0 items that can be displayed for current user (filtered), else false
Type | Name | Description |
---|---|---|
EPiServer.Core.ContentArea | contentArea |
Type | Description |
---|---|
System.Boolean |
Render all fragments in the 'Content Area' to a string.
Returns a string with all HTML generated from the 'Content Area' based on current visitors access
Type | Name | Description |
---|---|---|
EPiServer.Core.ContentArea | contentArea |
Type | Description |
---|---|
System.String |
Render all fragments in the 'Content Area' to a StringBuilder.
Returns a StringBuilder with all HTML generated from the 'Content Area' based on current visitors access
Type | Name | Description |
---|---|---|
EPiServer.Core.ContentArea | contentArea |
Type | Description |
---|---|
System.Text.StringBuilder |
Convert items in ContentArea To T
Filters on current user rights, personalization
Item must be castable to T to be yieldYou can use 'SelectFiltered' to ReactServerSideRender as 'additional props' to bypass the way ContentArea are rendered, which in return will convert all properties in all content of the area to 'dictionary', which can easily be used as Props
Name | Description |
---|---|
T |
Type | Name | Description |
---|---|---|
EPiServer.Core.ContentArea | contentArea | |
System.Boolean | filterByPublished | Set to True to force filtering on Published Content, also filters away deleted content and deleted content types |
Type | Description |
---|---|
IEnumerable<T> | Returns an IEnumerable of T |
}