Class WebPageMetadata
Web page metadata.
public sealed class WebPageMetadata
- Inheritance
-
objectWebPageMetadata
- Extension Methods
Constructors
WebPageMetadata()
Initializes a new instance of WebPageMetadata
public WebPageMetadata()
WebPageMetadata(int, Guid, int, string, string, int, int, int)
Initializes a new instance of WebPageMetadata
[Obsolete("Use parameterless constructor and initialize properties instead.")]
[ObsoleteSince(28, 4)]
public WebPageMetadata(int webPageId, Guid webPageGuid, int parentId, string name, string treePath, int websiteChannelId, int contentItemId, int order)
Parameters
webPageId
intWeb page identifier.
webPageGuid
GuidWeb page GUID.
parentId
intParent identifier. 0 if the web page has no parent.
name
stringCode name of the web page.
treePath
stringTree path.
websiteChannelId
intIdentifier of a channel in which the web page is created.
contentItemId
intUnderlying content item identifier.
order
intOrder of the web page in the level of a tree defined by TreePath.
Remarks
In most cases, there is no need to manually initialize an instance of WebPageMetadata. Instead, use GetWebPageMetadata(int, CancellationToken) to obtain an initialized object. This constructor is primarily intended for testing purposes.
Exceptions
- ArgumentException
Thrown when
name
is null or empty.
Properties
ContentItemID
Underlying content item identifier.
public int ContentItemID { get; init; }
Property Value
- int
ContentTypeID
Underlying content type identifier.
public int ContentTypeID { get; init; }
Property Value
- int
IsSecured
Indicates if web page is secured.
public bool IsSecured { get; init; }
Property Value
- bool
Name
Code name of the web page.
public string Name { get; set; }
Property Value
- string
Order
Order of the web page in the level of a tree defined by TreePath.
public int Order { get; init; }
Property Value
- int
ParentID
Parent identifier. 0 if the web page has no parent.
public int ParentID { get; init; }
Property Value
- int
TreePath
Tree path.
public string TreePath { get; init; }
Property Value
- string
WebPageGUID
Web page GUID.
public Guid WebPageGUID { get; init; }
Property Value
- Guid
WebPageID
Web page identifier.
public int WebPageID { get; init; }
Property Value
- int
WebsiteChannelID
Identifier of a channel in which the web page is created.
public int WebsiteChannelID { get; init; }
Property Value
- int
Methods
InitFromContainer(IDataContainer)
Initializes the WebPageMetadata from data container.
public static WebPageMetadata InitFromContainer(IDataContainer dataContainer)
Parameters
dataContainer
IDataContainerWeb page data container.
Returns
Remarks
Data container needs to contain all CMS.Websites.Internal.WebPageItemInfo columns and CMS.ContentEngine.Internal.ContentItemInfo.ContentItemContentTypeID, CMS.ContentEngine.Internal.ContentItemInfo.ContentItemIsSecured columns.