Merge pull request #1858 from Jeavon/RelatedLinks-Tweaks
Tweaks to RelatedLinks
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +110,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
|
||||
{
|
||||
relatedLink.Id = contentId;
|
||||
relatedLink = CreateLink(relatedLink);
|
||||
relatedLink.Content = UmbracoContext.Current.ContentCache.GetById(contentId);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user