Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
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?