Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

Url property disappear when adding and publishing

$
0
0

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?


Viewing all articles
Browse latest Browse all 6894

Trending Articles