Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Anyone know what happened to .DocumentTypeAlias property in Umbraco 8?
I've looked at the source and IPublishedContent doesn't appear to have the property available; has the name changed or has it been moved elsewhere?
Any ideas on how to get access to it?
Thanks!
Hi Olly,
It has changed a bit in V8
You will need do this to get the doctype alias
@Model.ContentType.Alias
Dave
Perfect, thank you Dave!
There's a useful extension method on IPublishedContent too if you want to check a content item is of a given document type: @Model.IsDocumentType("myDocType").
IPublishedContent
@Model.IsDocumentType("myDocType")
Andy
Thank you, very useful!
And if you have access to the PublishedContentModels you can use f.e. MediaBlock.ModelTypeAlias
MediaBlock.ModelTypeAlias
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Umbraco 8 - Where is .DocumentTypeAlias?
Anyone know what happened to .DocumentTypeAlias property in Umbraco 8?
I've looked at the source and IPublishedContent doesn't appear to have the property available; has the name changed or has it been moved elsewhere?
Any ideas on how to get access to it?
Thanks!
Hi Olly,
It has changed a bit in V8
You will need do this to get the doctype alias
Dave
Perfect, thank you Dave!
There's a useful extension method on
IPublishedContent
too if you want to check a content item is of a given document type:@Model.IsDocumentType("myDocType")
.Andy
Thank you, very useful!
And if you have access to the PublishedContentModels you can use f.e.
MediaBlock.ModelTypeAlias
is working on a reply...