Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IContentType

    Defines a ContentType, which Content is based on

    Namespace: Umbraco.Cms.Core.Models
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IContentType : IContentTypeComposition, IContentTypeBase, IUmbracoEntity, ITreeEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty

    Properties

    View Source

    AllowedTemplates

    Gets or Sets a list of Templates which are allowed for the ContentType

    Declaration
    IEnumerable<ITemplate>? AllowedTemplates { get; set; }
    Property Value
    Type Description
    System.Nullable<IEnumerable<ITemplate>>
    View Source

    DefaultTemplate

    Gets the default Template of the ContentType

    Declaration
    ITemplate DefaultTemplate { get; }
    Property Value
    Type Description
    ITemplate
    View Source

    DefaultTemplateId

    Internal property to store the Id of the default template

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

    HistoryCleanup

    Gets or sets the history cleanup configuration.

    Declaration
    HistoryCleanup HistoryCleanup { get; set; }
    Property Value
    Type Description
    HistoryCleanup

    The history cleanup configuration.

    Methods

    View Source

    DeepCloneWithResetIdentities(String)

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

    Declaration
    IContentType DeepCloneWithResetIdentities(string newAlias)
    Parameters
    Type Name Description
    System.String newAlias
    Returns
    Type Description
    IContentType
    View Source

    IsAllowedTemplate(Int32)

    Determines if AllowedTemplates contains templateId

    Declaration
    bool IsAllowedTemplate(int templateId)
    Parameters
    Type Name Description
    System.Int32 templateId

    The template id to check

    Returns
    Type Description
    System.Boolean

    True if AllowedTemplates contains the templateId else False

    View Source

    IsAllowedTemplate(String)

    Determines if AllowedTemplates contains templateId

    Declaration
    bool IsAllowedTemplate(string templateAlias)
    Parameters
    Type Name Description
    System.String templateAlias

    The template alias to check

    Returns
    Type Description
    System.Boolean

    True if AllowedTemplates contains the templateAlias else False

    View Source

    RemoveTemplate(ITemplate)

    Removes a template from the list of allowed templates

    Declaration
    bool RemoveTemplate(ITemplate template)
    Parameters
    Type Name Description
    ITemplate template

    ITemplate to remove

    Returns
    Type Description
    System.Boolean

    True if template was removed, otherwise False

    View Source

    SetDefaultTemplate(ITemplate)

    Sets the default template for the ContentType

    Declaration
    void SetDefaultTemplate(ITemplate template)
    Parameters
    Type Name Description
    ITemplate template

    Default ITemplate

    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • AllowedTemplates
      • DefaultTemplate
      • DefaultTemplateId
      • HistoryCleanup
    • Methods
      • DeepCloneWithResetIdentities(String)
      • IsAllowedTemplate(Int32)
      • IsAllowedTemplate(String)
      • RemoveTemplate(ITemplate)
      • SetDefaultTemplate(ITemplate)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX