Class PageType
Read and save page type information
Inherited Members
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 11.20.7Syntax
public class PageType : ContentType, IComparable, IComparable<ContentType>, IReadOnly<PageType>, IReadOnly
Constructors
PageType()
Initializes a new instance of the PageTypeDefault
class.
Declaration
public PageType()
PageType(Int32, Guid, String, String, String, Boolean, Int32)
Initializes a new instance of the PageType class.
Declaration
public PageType(int id, Guid guid, string name, string description, string fileName, bool isAvailable, int sortOrder)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The id. |
System.Guid | guid | The GUID based identifier |
System.String | name | The name. |
System.String | description | The description. |
System.String | fileName | Name of the file. |
System.Boolean | isAvailable | if set to |
System.Int32 | sortOrder | The sort order. |
Properties
Defaults
Gets or sets the default values for meta data
Declaration
public PageTypeDefault Defaults { get; set; }
Property Value
Type | Description |
---|---|
PageTypeDefault |
ExportableFileName
Gets the filename in an exportable format which is a application relative path "~"
Declaration
public string ExportableFileName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the exportable file. |
FileName
RootRelative url to the actual template file (i.e. something starting with "/"). If the backing path from the database is relative (i.e. not starting with "/"), it will be interpreted as relative to the (possibly relocated) UI-folder before being returned as a root-relative path. If the name begins with a magic placeholder (i.e. {EPsUploadDir} or {EPsRootDir}) it is returned unchanged. If the path has not been set null is returned.
Declaration
public string FileName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
CreateWritableClone()
Declaration
public PageType CreateWritableClone()
Returns
Type | Description |
---|---|
PageType |
CreateWritableCloneImplementation()
The method called by IReadOnly.CreateWritableClone.
Declaration
protected override object CreateWritableCloneImplementation()
Returns
Type | Description |
---|---|
System.Object | A clone of this object that is writable. |
Overrides
Remarks
This method is called by CreateWritableClone(). If you are inheriting, directly or indirectly, from ContentType you should override this method to make sure that all reference type members of your class are cloned.
Your override of this method must create the clone by calling base.CreateWritableCloneImplementation()
. This ensures that all
classes in the inheritance chain can create clones as necessary. Also, by calling the base implementation the values of all value
type members are copied as ContentType's implementation of this method calls System.Object.MemberwiseClone().
FileNameForSite(SiteDefinition)
Get the absolute path for the web form template path.
Declaration
public string FileNameForSite(SiteDefinition siteDef)
Parameters
Type | Name | Description |
---|---|---|
SiteDefinition | siteDef | Site settings |
Returns
Type | Description |
---|---|
System.String | The absolute path for the file |
MakeReadOnly()
Makes the current instance and all it's properties read-only.
Declaration
public override void MakeReadOnly()
Overrides
Remarks
After calling this method the IsReadOnly property will return true
.
ResetContentType()
Resets data that can be set from model.
Declaration
public override void ResetContentType()