Class ContentChannel
Seetings used for data managing through interface IContentChannelHandler.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.ContentChannels
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class ContentChannel : IItem
Constructors
ContentChannel()
Initializes a new instance of the ContentChannel class.
Declaration
public ContentChannel()
ContentChannel(String, Guid, Guid, String)
Initializes a new instance of the ContentChannel class.
Declaration
public ContentChannel(string channelId, Guid rootPageId, Guid rootBlockId, string virtualFilePathRoot)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The identity of the channel |
System.Guid | rootPageId | States which page in EpiServer that is the root for this channel. |
System.Guid | rootBlockId | The root block id. |
System.String | virtualFilePathRoot | The virtual file path root. |
Remarks
channelId must be unique
Properties
ChannelId
Gets the unique channel id.
Declaration
public string ChannelId { get; set; }
Property Value
Type | Description |
---|---|
System.String | The channel id. |
DefaultContentTypeName
Gets or sets the default content type id that an imported content will get if not an explicit content type is given.
Declaration
public string DefaultContentTypeName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default content type name. |
DefaultPageTypeName
Gets or sets the default name of the page type.
Declaration
[Obsolete("Use DefaultContentTypeName instead")]
public string DefaultPageTypeName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default name of the page type. |
Id
Gets an unique (Guid) identity for the channel in
Declaration
public object Id { get; }
Property Value
Type | Description |
---|---|
System.Object | The id. |
Item[String]
Gets the property mapping external property name/EPiServer property name System.Collections.Generic.IDictionary<TKey, TValue> for the specified content type id.
Declaration
public IDictionary<string, ListWrapper> this[string contentTypeName] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | contentTypeName |
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, ListWrapper> | mapping external property name/EPiServer property name |
MappedContentTypes
Gets the mapped content types.
Declaration
public ICollection<string> MappedContentTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.ICollection<System.String> | The mapped content types. |
MappedPageTypes
Gets the mapped page types.
Declaration
[Obsolete("Use MappedContentTypes instead")]
public ICollection<string> MappedPageTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.ICollection<System.String> | The mapped page types. |
Name
Gets the unique name for the channel
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String | The name. |
RootBlockId
Gets or sets the root file id for this channel. Imported files without given parent will be created under this root.
Declaration
public Guid RootBlockId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid | The root file id. |
RootPageId
Gets or sets the root page id for this channel. Imported pages without given parent will be created under this page.
Declaration
public Guid RootPageId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid | The root page id. |
SaveAction
Gets or sets the save action that should be performed when a page is imported using this channel
Declaration
public SaveAction SaveAction { get; set; }
Property Value
Type | Description |
---|---|
SaveAction | The save action. |
VirtualFilePathRoot
Gets or sets the virtual file path root for this channel. Imported files for this channel can only be created under this root.
Declaration
public string VirtualFilePathRoot { get; set; }
Property Value
Type | Description |
---|---|
System.String | The virtual file path root. |
Remarks
Files attached to a specific page can also be created under page folder
Methods
AddMapping(String)
Adds a mapping for a content type.
Declaration
public IDictionary<string, ListWrapper> AddMapping(string contentTypeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | contentTypeName | Name of the content type. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, ListWrapper> |
RemoveMapping(String)
Removes the mapping for a content type
Declaration
public bool RemoveMapping(string contentTypeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | contentTypeName | Name of the content type. |
Returns
Type | Description |
---|---|
System.Boolean |
TryGetValue(String, out IDictionary<String, ListWrapper>)
Tries to get a property mapping.
Declaration
public bool TryGetValue(string contentTypeName, out IDictionary<string, ListWrapper> mapping)
Parameters
Type | Name | Description |
---|---|---|
System.String | contentTypeName | Name of the content type. |
System.Collections.Generic.IDictionary<System.String, ListWrapper> | mapping | An out argument that will be set if a EPiServer.ContentChannels.ContentChannel.PropertyMap exists for the pageTypeName |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if mapping exists otherwise false |