Search Results for

    Show / Hide Table of Contents
    View Source

    Class ContentItemDisplay<TVariant>

    A model representing a content item to be displayed in the back office

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Models.ContentEditing
    Assembly: Umbraco.Core.dll
    Syntax
    [DataContract(Name = "content", Namespace = "")]
    public class ContentItemDisplay<TVariant> : INotificationModel, IErrorModel where TVariant : ContentVariantDisplay
    Type Parameters
    Name Description
    TVariant

    Constructors

    View Source

    ContentItemDisplay()

    Declaration
    public ContentItemDisplay()

    Properties

    View Source

    AdditionalData

    A collection of extra data that is available for this specific entity/entity type

    Declaration
    [DataMember(Name = "metaData")]
    public IDictionary<string, object>? AdditionalData { get; }
    Property Value
    Type Description
    System.Nullable<IDictionary<System.String, System.Object>>
    View Source

    AllowedActions

    The allowed 'actions' based on the user's permissions - Create, Update, Publish, Send to publish

    Declaration
    [DataMember(Name = "allowedActions")]
    public IEnumerable<string>? AllowedActions { get; set; }
    Property Value
    Type Description
    System.Nullable<IEnumerable<System.String>>
    Remarks

    Each char represents a button which we can then map on the front-end to the correct actions

    View Source

    AllowedTemplates

    Declaration
    [DataMember(Name = "allowedTemplates")]
    public IDictionary<string, string>? AllowedTemplates { get; set; }
    Property Value
    Type Description
    System.Nullable<IDictionary<System.String, System.String>>
    View Source

    AllowPreview

    Determines whether previewing is allowed for this node

    Declaration
    [DataMember(Name = "allowPreview")]
    public bool AllowPreview { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    By default this is true but by using events developers can toggle this off for certain documents if there is nothing to preview

    View Source

    ContentApps

    Declaration
    [DataMember(Name = "apps")]
    public IEnumerable<ContentApp> ContentApps { get; set; }
    Property Value
    Type Description
    IEnumerable<ContentApp>
    View Source

    ContentDto

    The DTO object used to gather all required content data including data type information etc... for use with validation - used during inbound model binding

    Declaration
    [IgnoreDataMember]
    public ContentPropertyCollectionDto ContentDto { get; set; }
    Property Value
    Type Description
    ContentPropertyCollectionDto
    Remarks

    We basically use this object to hydrate all required data from the database into one object so we can validate everything we need instead of having to look up all the data individually. This is not used for outgoing model information.

    View Source

    ContentTypeAlias

    Declaration
    [DataMember(Name = "contentTypeAlias", IsRequired = true)]
    [Required(AllowEmptyStrings = false)]
    public string ContentTypeAlias { get; set; }
    Property Value
    Type Description
    System.String
    View Source

    ContentTypeId

    Declaration
    [DataMember(Name = "contentTypeId")]
    public int? ContentTypeId { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Int32>
    View Source

    ContentTypeKey

    Declaration
    [DataMember(Name = "contentTypeKey")]
    public Guid ContentTypeKey { get; set; }
    Property Value
    Type Description
    Guid
    View Source

    ContentTypeName

    The name of the content type

    Declaration
    [DataMember(Name = "contentTypeName")]
    public string ContentTypeName { get; set; }
    Property Value
    Type Description
    System.String
    View Source

    DocumentType

    Declaration
    [DataMember(Name = "documentType")]
    public ContentTypeBasic DocumentType { get; set; }
    Property Value
    Type Description
    ContentTypeBasic
    View Source

    Errors

    This is used for validation of a content item.

    Declaration
    [DataMember(Name = "ModelState")]
    public IDictionary<string, object> Errors { get; set; }
    Property Value
    Type Description
    IDictionary<System.String, System.Object>
    Remarks

    A content item can be invalid but still be saved. This occurs when there's property validation errors, we will still save the item but it cannot be published. So we need a way of returning validation errors as well as the updated model. NOTE: The ProperCase is important because when we return ModeState normally it will always be proper case.

    View Source

    Icon

    Declaration
    [DataMember(Name = "icon")]
    public string Icon { get; set; }
    Property Value
    Type Description
    System.String
    View Source

    Id

    Declaration
    [DataMember(Name = "id", IsRequired = true)]
    [Required]
    public int Id { get; set; }
    Property Value
    Type Description
    System.Int32
    View Source

    IsBlueprint

    Declaration
    [DataMember(Name = "isBlueprint")]
    public bool IsBlueprint { get; set; }
    Property Value
    Type Description
    System.Boolean
    View Source

    IsChildOfListView

    Property indicating if this item is part of a list view parent

    Declaration
    [DataMember(Name = "isChildOfListView")]
    public bool IsChildOfListView { get; set; }
    Property Value
    Type Description
    System.Boolean
    View Source

    IsContainer

    Indicates if the content is configured as a list view container

    Declaration
    [DataMember(Name = "isContainer")]
    public bool IsContainer { get; set; }
    Property Value
    Type Description
    System.Boolean
    View Source

    IsElement

    Indicates if the content is configured as an element

    Declaration
    [DataMember(Name = "isElement")]
    public bool IsElement { get; set; }
    Property Value
    Type Description
    System.Boolean
    View Source

    Key

    This is the unique Id stored in the database - but could also be the unique id for a custom membership provider

    Declaration
    [DataMember(Name = "key")]
    public Guid? Key { get; set; }
    Property Value
    Type Description
    System.Nullable<Guid>
    View Source

    Notifications

    This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes.

    Declaration
    [DataMember(Name = "notifications")]
    public List<BackOfficeNotification> Notifications { get; }
    Property Value
    Type Description
    List<BackOfficeNotification>
    View Source

    Owner

    Declaration
    [DataMember(Name = "owner")]
    public UserProfile Owner { get; set; }
    Property Value
    Type Description
    UserProfile
    View Source

    ParentId

    Declaration
    [DataMember(Name = "parentId", IsRequired = true)]
    [Required]
    public int? ParentId { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Int32>
    View Source

    Path

    The path of the entity

    Declaration
    [DataMember(Name = "path")]
    public string Path { get; set; }
    Property Value
    Type Description
    System.String
    View Source

    PersistedContent

    The real persisted content object - used during inbound model binding

    Declaration
    [IgnoreDataMember]
    public IContent PersistedContent { get; set; }
    Property Value
    Type Description
    IContent
    Remarks

    This is not used for outgoing model information.

    View Source

    SortOrder

    Declaration
    [DataMember(Name = "sortOrder")]
    public int SortOrder { get; set; }
    Property Value
    Type Description
    System.Int32
    View Source

    TemplateAlias

    Declaration
    [DataMember(Name = "template")]
    public string TemplateAlias { get; set; }
    Property Value
    Type Description
    System.String
    View Source

    TemplateId

    Declaration
    [DataMember(Name = "templateId")]
    public int TemplateId { get; set; }
    Property Value
    Type Description
    System.Int32
    View Source

    Trashed

    Declaration
    [DataMember(Name = "trashed")]
    public bool Trashed { get; set; }
    Property Value
    Type Description
    System.Boolean
    View Source

    TreeNodeUrl

    Property for the entity's individual tree node URL

    Declaration
    [DataMember(Name = "treeNodeUrl")]
    public string TreeNodeUrl { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    This is required if the item is a child of a list view since the tree won't actually be loaded, so the app will need to go fetch the individual tree node in order to be able to load it's action list (menu)

    View Source

    Udi

    Declaration
    [DataMember(Name = "udi")]
    public Udi Udi { get; set; }
    Property Value
    Type Description
    Udi
    View Source

    UpdateDate

    This is the last updated date for the entire content object regardless of variants

    Declaration
    [DataMember(Name = "updateDate")]
    public DateTime UpdateDate { get; set; }
    Property Value
    Type Description
    DateTime
    Remarks

    Each variant has it's own update date assigned as well

    View Source

    Updater

    Declaration
    [DataMember(Name = "updater")]
    public UserProfile Updater { get; set; }
    Property Value
    Type Description
    UserProfile
    View Source

    Urls

    Declaration
    [DataMember(Name = "urls")]
    public UrlInfo[] Urls { get; set; }
    Property Value
    Type Description
    UrlInfo[]
    View Source

    Variants

    A collection of content variants

    Declaration
    [DataMember(Name = "variants")]
    public IEnumerable<TVariant> Variants { get; set; }
    Property Value
    Type Description
    IEnumerable<TVariant>
    Remarks

    If a content item is invariant, this collection will only contain one item, else it will contain all culture variants

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • ContentItemDisplay()
    • Properties
      • AdditionalData
      • AllowedActions
      • AllowedTemplates
      • AllowPreview
      • ContentApps
      • ContentDto
      • ContentTypeAlias
      • ContentTypeId
      • ContentTypeKey
      • ContentTypeName
      • DocumentType
      • Errors
      • Icon
      • Id
      • IsBlueprint
      • IsChildOfListView
      • IsContainer
      • IsElement
      • Key
      • Notifications
      • Owner
      • ParentId
      • Path
      • PersistedContent
      • SortOrder
      • TemplateAlias
      • TemplateId
      • Trashed
      • TreeNodeUrl
      • Udi
      • UpdateDate
      • Updater
      • Urls
      • Variants
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX