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
Hello,
I'm trying to get the DocumentType from a loop.
@foreach (var level in @Model.Children) { @level.documentType }
It doesn't work ^^
Thank you by advance
Instead, try:
@level.NodeTypeAlias
With this Alias you should be able to get the an instance of the docType class (if needed) like so:
var docType = umbraco.cms.businesslogic.web.DocumentType.GetByAlias(level.NodeTypeAlias);
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Get DocumentType from a macro
Hello,
I'm trying to get the DocumentType from a loop.
It doesn't work ^^
Thank you by advance
Instead, try:
With this Alias you should be able to get the an instance of the docType class (if needed) like so:
is working on a reply...