IPublishedContent Property Access & Extension Methods
Umbraco Properties
@* gets the current page Url *@
@Model.Url(PublishedUrlProvider)
@* gets the Creation date, and formats it to a short date *@
@Model.CreateDate.ToString("D")
{% hint style="info" %}
The `Parent` and `Children` navigation properties were removed from `IPublishedContent` in Umbraco 18. In Razor views use the `Parent()` and `Children()` extension methods instead. See the [Version-specific upgrades](../../../../get-started/upgrading-and-migrating/version-specific/README.md) article for details.
{% endhint %}.Id
@Model.Id.Name
.Name(IVariationContextAccessor, string culture = null)
.ContentType
.GetCultureFromDomains(IUmbracoContextAccessor, ISiteDomainHelper, Uri current = null)
.Parent() (Extension method)
.Path
.Level
.TemplateId
.SortOrder
.Url(PublishedUrlProvider, culture = null, UrlMode mode = UrlMode.Default) - (Extension method)
.UrlSegment
.UrlSegment(IVariationContextAccessor, string culture = null)
.WriterId
.WriterName(IUserService)
.CreatorId
.CreatorName(IUserService)
.CreateDate
.UpdateDate
Custom properties
Model.Value(IPublishedValueFallback, string)
Model.Value<T>(string)
Fallbacks
Fallback to Default Value
Fallback to Ancestors
Fallback to Language
Fallback to Default Language
Combining the Fallback options
Property Methods
.HasProperty(string propertyAlias)
.HasValue(string propertyAlias)
Last updated
Was this helpful?