November Happy Hour will be moved to Thursday December 5th.

Class NodeContent

Class to store information about CatalogNode object

Inheritance
System.Object
NodeContent
Implements
EPiServer.Data.Entity.IReadOnly<CatalogContentBase>
EPiServer.Data.Entity.IReadOnly
EPiServer.Core.IContent
EPiServer.Core.IContentData
EPiServer.Core.ILocalizable
EPiServer.Core.ILocale
EPiServer.Core.IVersionable
EPiServer.Web.Routing.IRoutable
EPiServer.Security.IContentSecurable
EPiServer.Security.ISecurable
EPiServer.Core.IChangeTrackable
Namespace: EPiServer.Commerce.Catalog.ContentTypes
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0
Syntax
[CatalogContentType(GUID = "fbdb3206-2651-47dc-9d10-42bfb2d0eb4d", DisplayName = "Category", AvailableInEditMode = false)]
[CLSCompliant(false)]
public class NodeContent : NodeContentBase, IReadOnly<CatalogContentBase>, IReadOnly, IContent, IContentData, ILocalizable, ILocale, IVersionable, IRoutable, IContentSecurable, ISecurable, IMetaClass, ISearchEngineInformation, IChangeTrackable, ICategorizable, IAssetContainer
Remarks

For more information read the Working with the Catalog as IContent article.

Examples

An example of how to create a Commerce content type:

using EPiServer.Commerce.Catalog.ContentTypes;
using EPiServer.Commerce.Catalog.DataAnnotations;
using EPiServer.Core;
using EPiServer.DataAnnotations;

namespace CodeSamples.EPiServer.Commerce.Catalog.Provider { [CatalogContentType] public class CatalogContentTypeSample : VariationContent { [CultureSpecific] [Tokenize] [Encrypted] [UseInComparison] [IncludeValuesInSearchResults] [IncludeInDefaultSearch] [SortableInSearchResults] public virtual string Description { get; set; }

public virtual int Size { get; set; }

[DecimalSettings(18, 0)] public virtual decimal Discount { get; set; } } }

Constructors

NodeContent()

Declaration
public NodeContent()

Properties

Categories

Gets or sets the categories item which holds the category data.

Declaration
[IgnoreMetaDataPlusSynchronization]
public virtual Categories Categories { get; set; }
Property Value
Type Description
Categories

Changed

Gets or sets the DateTime when has changed

Declaration
public virtual DateTime Changed { get; set; }
Property Value
Type Description
System.DateTime

ChangedBy

Gets or sets the ChangedBy when has changed

Declaration
public virtual string ChangedBy { get; set; }
Property Value
Type Description
System.String

Code

Gets or sets the code.

Declaration
[IgnoreMetaDataPlusSynchronization]
public virtual string Code { get; set; }
Property Value
Type Description
System.String

CommerceMediaCollection

Gets or sets the commerce media for catalog node

Declaration
[IgnoreMetaDataPlusSynchronization]
public virtual ItemCollection<CommerceMedia> CommerceMediaCollection { get; set; }
Property Value
Type Description
ItemCollection<CommerceMedia>

ContentType

Gets the type of the content.

Declaration
public override CatalogContentType ContentType { get; }
Property Value
Type Description
CatalogContentType

The type of the content.

Overrides

Created

Gets the date and time when this content instance was created

Declaration
public virtual DateTime Created { get; set; }
Property Value
Type Description
System.DateTime

CreatedBy

Gets the username of the user that created this content instance.

Declaration
public virtual string CreatedBy { get; set; }
Property Value
Type Description
System.String

Deleted

Gets or sets the deleted date.

Declaration
public virtual DateTime? Deleted { get; set; }
Property Value
Type Description
System.Nullable<System.DateTime>

DeletedBy

Gets or sets who deleted the content.

Declaration
public virtual string DeletedBy { get; set; }
Property Value
Type Description
System.String

DisplayName

Gets or sets the display name.

Declaration
public virtual string DisplayName { get; set; }
Property Value
Type Description
System.String

IsModified

Gets a value indicating whether this instance has been modified after loading.

Declaration
public override bool IsModified { get; set; }
Property Value
Type Description
System.Boolean

true if this instance has been modified; otherwise, false.

Overrides

MetaClassId

Gets or sets the meta class id.

Declaration
[IgnoreMetaDataPlusSynchronization]
public virtual int MetaClassId { get; set; }
Property Value
Type Description
System.Int32
Remarks

This property is not designed to be set by client code. The meta class of the content should be defined by decorating the class with the CatalogContentTypeAttribute and defining the MetaClassName property.

Saved

Gets the date and time when this content instance was last saved.

Declaration
public virtual DateTime Saved { get; set; }
Property Value
Type Description
System.DateTime

SeoInformation

Gets or sets the seo info.

Declaration
[IgnoreMetaDataPlusSynchronization]
public virtual SeoInformation SeoInformation { get; set; }
Property Value
Type Description
SeoInformation

SeoUri

Gets or sets the SEO URI.

Declaration
[IgnoreMetaDataPlusSynchronization]
[ValidUrl]
public virtual string SeoUri { get; set; }
Property Value
Type Description
System.String

SetChangedOnPublish

Gets or sets a value indicating whether the Changed should be updated on publish.

Declaration
public virtual bool SetChangedOnPublish { get; set; }
Property Value
Type Description
System.Boolean
Remarks

The commerce backend has only one date field, so we cannot differentiate between Saved and Changed. Because of this, this property will always return true.

Methods

CreateWriteableCloneImplementation()

Creates the writeable clone including writeable clones of the content link and the language collection.

Declaration
protected override object CreateWriteableCloneImplementation()
Returns
Type Description
System.Object
Overrides

MakeReadOnly()

Protects from modifying this object.

Declaration
public override void MakeReadOnly()
Overrides

ResetModified()

Resets the modified flag.

Declaration
protected override void ResetModified()
Overrides

Implements

EPiServer.Data.Entity.IReadOnly<>
EPiServer.Data.Entity.IReadOnly
EPiServer.Core.IContent
EPiServer.Core.IContentData
EPiServer.Core.ILocalizable
EPiServer.Core.ILocale
EPiServer.Core.IVersionable
EPiServer.Web.Routing.IRoutable
EPiServer.Security.IContentSecurable
EPiServer.Security.ISecurable
EPiServer.Core.IChangeTrackable

Extension Methods