Interface INavigableContent
Represents a content that can be navigated via XPath.
Namespace: Umbraco.Cms.Core.Xml.XPath
Assembly: Umbraco.Core.dll
Syntax
public interface INavigableContent
Properties
View SourceChildIds
Gets the unique identifiers of the children of the navigable content.
Declaration
IList<int>? ChildIds { get; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<IList<System.Int32>> |
Id
Gets the unique identifier of the navigable content.
Declaration
int Id { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Remarks
The root node identifier should be -1.
ParentId
Gets the unique identifier of parent of the navigable content.
Declaration
int ParentId { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Remarks
The top-level content parent identifiers should be -1 ie the identifier
of the root node, whose parent identifier should in turn be -1.
Type
Gets the type of the navigable content.
Declaration
INavigableContentType Type { get; }
Property Value
| Type | Description |
|---|---|
| INavigableContentType |
Methods
View SourceValue(Int32)
Gets the value of a field of the navigable content for XPath navigation use.
Declaration
object Value(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | The field index. |
Returns
| Type | Description |
|---|---|
| System.Object | The value of the field for XPath navigation use. |
Remarks
Fields are attributes or elements depending on their relative index value compared to source.LastAttributeIndex.
For attributes, the value must be a string.
For elements, the value should an XPathNavigator instance if the field is xml
and has content (is not empty), null to indicate that the element is empty, or a string
which can be empty, whitespace... depending on what the data type wants to expose.