Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IContent

    Represents a document.

    Namespace: Umbraco.Cms.Core.Models
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IContent : IContentBase, IUmbracoEntity, ITreeEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty
    Remarks

    A document can be published, rendered by a template.

    Properties

    View Source

    Blueprint

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

    Declaration
    bool Blueprint { get; set; }
    Property Value
    Type Description
    System.Boolean
    View Source

    Edited

    Gets a value indicating whether the content has been edited.

    Declaration
    bool Edited { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    Will return true once unpublished edits have been made after the version with PublishedVersionId has been published.

    View Source

    EditedCultures

    Gets the edited cultures.

    Declaration
    IEnumerable<string>? EditedCultures { get; set; }
    Property Value
    Type Description
    System.Nullable<IEnumerable<System.String>>
    View Source

    PublishCultureInfos

    Gets the published culture infos of the content.

    Declaration
    ContentCultureInfosCollection PublishCultureInfos { get; set; }
    Property Value
    Type Description
    ContentCultureInfosCollection
    Remarks

    Because a dictionary key cannot be null this cannot get the invariant name, which must be get via the PublishName property.

    View Source

    PublishDate

    Gets the date and time the content was published.

    Declaration
    DateTime? PublishDate { get; set; }
    Property Value
    Type Description
    System.Nullable<DateTime>
    View Source

    Published

    Gets a value indicating whether the content is published.

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

    The PublishedVersionId property tells you which version of the content is currently published.

    View Source

    PublishedCultures

    Gets the published cultures.

    Declaration
    IEnumerable<string> PublishedCultures { get; }
    Property Value
    Type Description
    IEnumerable<System.String>
    View Source

    PublishedState

    Declaration
    PublishedState PublishedState { get; set; }
    Property Value
    Type Description
    PublishedState
    View Source

    PublishedVersionId

    Gets the version identifier for the currently published version of the content.

    Declaration
    int PublishedVersionId { get; set; }
    Property Value
    Type Description
    System.Int32
    View Source

    PublisherId

    Gets the identifier of the user who published the content.

    Declaration
    int? PublisherId { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Int32>
    View Source

    PublishName

    Gets the name of the published version of the content.

    Declaration
    string PublishName { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    When editing the content, the name can change, but this will not until the content is published.

    View Source

    PublishTemplateId

    Gets the template id used to render the published version of the content.

    Declaration
    int? PublishTemplateId { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Int32>
    Remarks

    When editing the content, the template can change, but this will not until the content is published.

    View Source

    TemplateId

    Gets or sets the template id used to render the content.

    Declaration
    int? TemplateId { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Int32>

    Methods

    View Source

    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
    View Source

    GetPublishDate(String)

    Gets the date a culture was published.

    Declaration
    DateTime? GetPublishDate(string culture)
    Parameters
    Type Name Description
    System.String culture
    Returns
    Type Description
    System.Nullable<DateTime>
    View Source

    GetPublishName(String)

    Gets the name of the published version of the content for a given culture.

    Declaration
    string GetPublishName(string culture)
    Parameters
    Type Name Description
    System.String culture
    Returns
    Type Description
    System.String
    Remarks

    When editing the content, the name can change, but this will not until the content is published.

    When culture is null, gets the invariant language, which is the value of the PublishName property.

    View Source

    IsCultureEdited(String)

    Gets a value indicated whether a given culture is edited.

    Declaration
    bool IsCultureEdited(string culture)
    Parameters
    Type Name Description
    System.String culture
    Returns
    Type Description
    System.Boolean
    Remarks

    A culture is edited when it is available, and not published or published but with changes.

    A culture can be edited even though the document might now have been saved yet (and can have no identity).

    Does not support the '*' wildcard (returns false).

    View Source

    IsCulturePublished(String)

    Gets a value indicating whether a culture is published.

    Declaration
    bool IsCulturePublished(string culture)
    Parameters
    Type Name Description
    System.String culture
    Returns
    Type Description
    System.Boolean
    Remarks

    A culture becomes published whenever values for this culture are published, and the content published name for this culture is non-null. It becomes non-published whenever values for this culture are unpublished.

    A culture becomes published as soon as PublishCulture has been invoked, even though the document might not have been saved yet (and can have no identity).

    Does not support the '*' wildcard (returns false).

    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • Blueprint
      • Edited
      • EditedCultures
      • PublishCultureInfos
      • PublishDate
      • Published
      • PublishedCultures
      • PublishedState
      • PublishedVersionId
      • PublisherId
      • PublishName
      • PublishTemplateId
      • TemplateId
    • Methods
      • DeepCloneWithResetIdentities()
      • GetPublishDate(String)
      • GetPublishName(String)
      • IsCultureEdited(String)
      • IsCulturePublished(String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX