Merge pull request #1858 from Jeavon/RelatedLinks-Tweaks

Tweaks to RelatedLinks
This commit is contained in:
Claus
2017-07-12 15:26:53 +02:00
committed by GitHub
3 changed files with 10 additions and 9 deletions

View File

@@ -1,8 +1,11 @@
namespace Umbraco.Web.Models
using Umbraco.Core.Models;
namespace Umbraco.Web.Models
{
public class RelatedLink : RelatedLinkBase
{
public int? Id { get; internal set; }
internal bool IsDeleted { get; set; }
}
public class RelatedLink : RelatedLinkBase
{
public int? Id { get; internal set; }
internal bool IsDeleted { get; set; }
public IPublishedContent Content { get; set; }
}
}

View File

@@ -1,5 +1,4 @@
using Newtonsoft.Json;
using Umbraco.Core.Models;
namespace Umbraco.Web.Models
{
@@ -15,7 +14,5 @@ namespace Umbraco.Web.Models
public bool IsInternal { get; set; }
[JsonProperty("type")]
public RelatedLinkType Type { get; set; }
[JsonIgnore]
public IPublishedContent Content { get; set; }
}
}

View File

@@ -110,6 +110,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
{
relatedLink.Id = contentId;
relatedLink = CreateLink(relatedLink);
relatedLink.Content = UmbracoContext.Current.ContentCache.GetById(contentId);
}
else
{