Search Results for

    Show / Hide Table of Contents
    View Source

    Class TemplateOnDisk

    Represents a Template file that can have its content on disk.

    Inheritance
    System.Object
    BeingDirtyBase
    EntityBase
    File
    Template
    Namespace: Umbraco.Cms.Core.Models
    Assembly: Umbraco.Core.dll
    Syntax
    [DataContract(IsReference = true)]
    public class TemplateOnDisk : Template, ITemplate, IFile, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty

    Constructors

    View Source

    TemplateOnDisk(IShortStringHelper, String, String)

    Initializes a new instance of the TemplateOnDisk class.

    Declaration
    public TemplateOnDisk(IShortStringHelper shortStringHelper, string name, string alias)
    Parameters
    Type Name Description
    IShortStringHelper shortStringHelper

    The short string helper

    System.String name

    The name of the template.

    System.String alias

    The alias of the template.

    Properties

    View Source

    Content

    Gets or sets the content.

    Declaration
    public override string Content { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Getting the content while the template is "on disk" throws, the template must be saved before its content can be retrieved.

    Setting the content means it is not "on disk" anymore, and the template becomes (and behaves like) a normal template.

    View Source

    IsOnDisk

    Gets or sets a value indicating whether the content is on disk already.

    Declaration
    public bool IsOnDisk { get; set; }
    Property Value
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • TemplateOnDisk(IShortStringHelper, String, String)
    • Properties
      • Content
      • IsOnDisk
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX