Class RelationItem
Represents an item in a relation, containing node and content type information.
Inheritance
Namespace: Umbraco.Cms.Core.Models
Assembly: Umbraco.Core.dll
Syntax
[DataContract(Name = "relationItem", Namespace = "")]
public class RelationItem
Constructors
View SourceRelationItem()
Declaration
public RelationItem()
Properties
View SourceContentTypeAlias
Gets or sets the alias of the content type.
Declaration
[DataMember(Name = "alias")]
public string? ContentTypeAlias { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ContentTypeIcon
Gets or sets the icon associated with the content type.
Declaration
[DataMember(Name = "icon")]
public string? ContentTypeIcon { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ContentTypeKey
Gets or sets the unique key of the content type.
Declaration
[DataMember(Name = "contentTypeKey")]
public Guid ContentTypeKey { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid |
ContentTypeName
Gets or sets the name of the content type.
Declaration
[DataMember(Name = "contentTypeName")]
public string? ContentTypeName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
NodeId
Gets or sets the unique identifier of the node.
Declaration
[DataMember(Name = "id")]
public int NodeId { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
NodeKey
Gets or sets the unique key (GUID) of the node.
Declaration
[DataMember(Name = "key")]
public Guid NodeKey { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid |
NodeName
Gets or sets the name of the node.
Declaration
[DataMember(Name = "name")]
public string? NodeName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
NodePublished
Gets or sets a value indicating whether the node is published.
Declaration
[DataMember(Name = "published")]
public bool? NodePublished { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
NodeType
Gets or sets the type of the node (e.g., document, media).
Declaration
[DataMember(Name = "type")]
public string? NodeType { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
NodeUdi
Gets the UDI (Umbraco Document Identifier) for the node.
Declaration
[DataMember(Name = "udi")]
public Udi? NodeUdi { get; }
Property Value
| Type | Description |
|---|---|
| Udi |
Remarks
Returns null if the node type is unknown.
RelationTypeIsBidirectional
Gets or sets a value indicating whether the relation type is bidirectional.
Declaration
[DataMember(Name = "relationTypeIsBidirectional")]
public bool RelationTypeIsBidirectional { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
RelationTypeIsDependency
Gets or sets a value indicating whether the relation type represents a dependency.
Declaration
[DataMember(Name = "relationTypeIsDependency")]
public bool RelationTypeIsDependency { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
RelationTypeName
Gets or sets the name of the relation type.
Declaration
[DataMember(Name = "relationTypeName")]
public string? RelationTypeName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |