London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
using EPiServer.Cms.Shell.Json.Internal;
...
[JsonProperty]
[JsonConverter(typeof(UrlConverter))]
[Display(Name = "Link", Order = 2)]
public virtual Url LinkTo{ get; set; }
Probably has to do with json serialization which differs between frontend and backend. Try adding the above to get the same...
Am quite new to EpiSever so bare with me.
I have two classes like this:
namespace Whatever { public class Link { [UIHint(UIHint.Image)] [Display(Name = "Image", Description = "", GroupName = SystemTabNames.Content, Order = 1)] public virtual ContentReference Image { get; set; } [Display(Name = "Link", Description = "", GroupName = SystemTabNames.Content, Order = 2)] public virtual Url LinkTo { get; set; } } [PropertyDefinitionTypePlugIn] public class LinksProperty : PropertyList<Link> { } }
I've then created a block:
namespace Whatever.Models.Blocks { [ContentType(DisplayName = "LogoBlock", GUID = ".......", Description = "")] public class LogoBlock : SiteBlockData { [CultureSpecific] [Display( Name = "LinksList", Description = "LinksList", GroupName = SystemTabNames.Content, Order = 1)] [EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor<Link>))] public virtual IList<Link> LinksList { get; set; } } }
The above code creates a way to add a Link-Item but in EpiServer Editor when I add LinkTo and Image in Editor Mode and do publish the LinkTo-property disappears and I can't figure out why?
Need help?