Show / Hide Table of Contents

    Interface IContent

    Defines a Content object

    Namespace:System.Dynamic.ExpandoObject
    Assembly:Umbraco.Core.dll
    Syntax
    public interface IContent : IContentBase, IUmbracoEntity, IAggregateRoot, IDeletableEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty

    Properties

    ContentType

    Gets the ContentType used by this content object

    Declaration
    IContentType ContentType { get; }
    Property Value
    Type Description
    IContent​Type

    ExpireDate

    Gets or Sets the date the Content should expire and thus be unpublished

    Declaration
    DateTime? ExpireDate { get; set; }
    Property Value
    Type Description
    System.​Nullable<System.​Date​Time>

    HasPublishedVersion

    Gets a value indicating whether the content has a published version.

    Declaration
    bool HasPublishedVersion { get; }
    Property Value
    Type Description
    System.​Boolean

    IsBlueprint

    Gets a value indicating whether the content item is a blueprint.

    Declaration
    bool IsBlueprint { get; }
    Property Value
    Type Description
    System.​Boolean

    Language

    Declaration
    [Obsolete("This will be removed in future versions")]
    string Language { get; set; }
    Property Value
    Type Description
    System.​String

    Published

    Boolean indicating whether the Content is Published or not

    Declaration
    bool Published { get; }
    Property Value
    Type Description
    System.​Boolean

    PublishedVersionGuid

    Gets the unique identifier of the published version, if any.

    Declaration
    Guid PublishedVersionGuid { get; }
    Property Value
    Type Description
    System.​Guid

    ReleaseDate

    Gets or Sets the date the Content should be released and thus be published

    Declaration
    DateTime? ReleaseDate { get; set; }
    Property Value
    Type Description
    System.​Nullable<System.​Date​Time>

    Status

    Gets the current status of the Content

    Declaration
    ContentStatus Status { get; }
    Property Value
    Type Description
    Content​Status

    Template

    Gets or sets the template used by the Content. This is used to override the default one from the ContentType.

    Declaration
    ITemplate Template { get; set; }
    Property Value
    Type Description
    ITemplate

    WriterId

    Id of the user who wrote/updated the Content

    Declaration
    int WriterId { get; set; }
    Property Value
    Type Description
    System.​Int32

    Methods

    ChangeContentType(IContentType)

    Changes the IContent​Type for the current content object

    Declaration
    void ChangeContentType(IContentType contentType)
    Parameters
    Type Name Description
    IContent​Type contentType

    New ContentType for this content

    Remarks

    Leaves PropertyTypes intact after change

    ChangeContentType(IContentType, Boolean)

    Changes the IContent​Type for the current content object and removes PropertyTypes, which are not part of the new ContentType.

    Declaration
    void ChangeContentType(IContentType contentType, bool clearProperties)
    Parameters
    Type Name Description
    IContent​Type contentType

    New ContentType for this content

    System.​Boolean clearProperties

    Boolean indicating whether to clear PropertyTypes upon change

    ChangePublishedState(PublishedState)

    Changes the Published state of the content object

    Declaration
    void ChangePublishedState(PublishedState state)
    Parameters
    Type Name Description
    Published​State state

    DeepCloneWithResetIdentities()

    Creates a deep clone of the current entity with its identity/alias and it's property identities reset

    Declaration
    IContent DeepCloneWithResetIdentities()
    Returns
    Type Description
    IContent
    In This Article
    • Properties
      • ContentType
      • ExpireDate
      • HasPublishedVersion
      • IsBlueprint
      • Language
      • Published
      • PublishedVersionGuid
      • ReleaseDate
      • Status
      • Template
      • WriterId
    • Methods
      • ChangeContentType(IContentType)
      • ChangeContentType(IContentType, Boolean)
      • ChangePublishedState(PublishedState)
      • DeepCloneWithResetIdentities()
    Back to top Copyright © 2016 Umbraco
    Generated by DocFX