Class PublishedDocumentUrlSegment
Represents a URL segment for a published document.
Inheritance
object
Namespace: Umbraco.Cms.Core.Models
Assembly: Umbraco.Core.dll
Syntax
public class PublishedDocumentUrlSegment
Constructors
View SourcePublishedDocumentUrlSegment()
Declaration
public PublishedDocumentUrlSegment()
Properties
View SourceDocumentKey
Gets or sets the document key.
Declaration
public required Guid DocumentKey { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid |
IsDraft
Gets or sets a value indicating whether the URL segment is for a draft.
Declaration
public required bool IsDraft { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsPrimary
Gets or sets a value indicating whether the URL segment is the primary one (first resolved from the collection of URL providers).
Declaration
public required bool IsPrimary { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
LanguageId
Gets or sets the language Id.
Declaration
[Obsolete("Use NullableLanguageId instead. This property returns 0 for invariant content. Scheduled for removal in Umbraco 18, when the NullableLanguageId will also be renamed to LanguageId.")]
public int LanguageId { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Remarks
This property returns 0 for invariant content. Use NullableLanguageId instead,
which correctly returns null for invariant content.
NullableLanguageId
Gets or sets the language Id. NULL indicates invariant content (not language-specific).
Declaration
public required int? NullableLanguageId { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
UrlSegment
Gets or sets the URL segment string.
Declaration
public required string UrlSegment { get; set; }
Property Value
| Type | Description |
|---|---|
| string |