Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

New property in descendent of ImageData class does not appear in image edit pane in CMS

$
0
0

I have a class called ImageMedia that is based on the ImageData class in EPiServer.Core.  There is a property, Description, which should be generating a text entry field when I edit an image in the Media tab but it's not showing up.  The code:

using System;
using System.ComponentModel.DataAnnotations;
using EPiServer.Core;
using EPiServer.DataAbstraction;
using EPiServer.DataAnnotations;
using EPiServer.Framework.Blobs;
using EPiServer.Framework.DataAnnotations;
namespace ProQuest.Cms.Foundation.Media
{
    [ContentType(
        DisplayName = "Image Media",
        GUID = "b984ae67-63b6-4cd0-bf65-749ba4bd3526",
        Description = "Use this to upload image files.")]
    [MediaDescriptor(ExtensionString = "bmp,gif,jpg,jpeg,png,svg,tiff,ico")]
    public class ImageMedia : ImageData
    {
        [CultureSpecific]
        [Editable(true)]
        [Display(
            Name = "Alternate text",
            Description = "Description of the image",
            GroupName = SystemTabNames.Content,
            Order = 1)]
        public virtual string Description { get; set; }
        public override Blob Thumbnail => BinaryData;
    }
}

A breakpoint set on the line that declares Description never stops the process, but a breakpoint on the line that declares Thumbnail does pause execution.  (PS  I did not write this code.)


Viewing all articles
Browse latest Browse all 8020

Trending Articles