Class PublishedContentBase
Provide an abstract base class for IPublishedContent implementations.
Namespace: Umbraco.Cms.Core.Models.PublishedContent
Assembly: Umbraco.Core.dll
Syntax
[Obsolete("Please implement PublishableContentBase instead. Scheduled for removal in V19")]
public abstract class PublishedContentBase : PublishableContentBase, IPublishedContent, IPublishedElement
Remarks
This base class does which (a) consistently resolves and caches the URL, (b) provides an implementation for this[alias], and (c) provides basic content set management.
Constructors
View SourcePublishedContentBase(IVariationContextAccessor?)
Initializes a new instance of the PublishedContentBase class.
Declaration
protected PublishedContentBase(IVariationContextAccessor? variationContextAccessor)
Parameters
| Type | Name | Description |
|---|---|---|
| IVariationContextAccessor | variationContextAccessor | The variation context accessor. |
Properties
View SourceLevel
Gets the tree level of the content item.
Declaration
[Obsolete("Not supported for members. Scheduled for removal in Umbraco 18.")]
public abstract int Level { get; }
Property Value
| Type | Description |
|---|---|
| int |
Name
Gets the name of the content item for the current culture.
Declaration
public virtual string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Path
Gets the tree path of the content item.
Declaration
[Obsolete("Not supported for members. Scheduled for removal in Umbraco 18.")]
public abstract string Path { get; }
Property Value
| Type | Description |
|---|---|
| string |
TemplateId
Gets the identifier of the template to use to render the content item.
Declaration
public abstract int? TemplateId { get; }
Property Value
| Type | Description |
|---|---|
| int? |
UrlSegment
Gets the URL segment of the content item for the current culture.
Declaration
[Obsolete("Please use GetUrlSegment() on IDocumentUrlService instead. Scheduled for removal in Umbraco 20.")]
public virtual string? UrlSegment { get; }
Property Value
| Type | Description |
|---|---|
| string |