I have seen few posts regarding the same topic. However, I couldn't resolve the issue what I have.
I have a content schema, which has "Multimedia Link" field. I have created the model as below for my content schema.
[SemanticEntity(Vocab = "http://www.sdl.com/web/schemas/core", EntityName = "TextImage", Prefix = "tim", Public = true)]
public class TextImage:EntityModel
{
[SemanticProperty("tim:multimedia_link")]
public Image Multimedia_Link { get; set; }
[SemanticProperty("tim:title_text")]
public String Title_Text{ get; set; }
}
Below is my Image Model class:
public class Image :MediaItem
{
public override string ToHtml(string widthFactor, double aspect = 0, string cssClass = null, int containerSize = 0)
{
throw new NotImplementedException();
}
}
I have created my own multimedia schema with metadata fields. I have below questions. could you please help me with that?
- How to create model for the metadata fields in my Image class? Say for Eg: I have meta fields like (alt_text, height, width)
- How to set value for the metadata fields?
Thanks in advance. Jey