Skip to content
This repository was archived by the owner on Jun 18, 2018. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,23 @@ public static object ConvertPropertyToNestedContent(this PublishedPropertyType p
var pcr = UmbracoContext.Current.PublishedContentRequest;
var containerNode = pcr != null && pcr.HasPublishedContent ? pcr.PublishedContent : null;

processedValue.Add(new DetachedPublishedContent(
// Create the model based on our implementation of IPublishedContent
IPublishedContent content = new DetachedPublishedContent(
nameObj == null ? null : nameObj.ToString(),
publishedContentType,
properties.ToArray(),
containerNode,
i,
preview));
preview);

if (PublishedContentModelFactoryResolver.HasCurrent)
{
// Let the current model factory create a typed model to wrap our model
content = PublishedContentModelFactoryResolver.Current.Factory.CreateModel(content);
}

// Add the (typed) model as a result
processedValue.Add(content);
}

if (propertyType.IsSingleNestedContentProperty())
Expand Down