Sitefinity Custom Module and the MultiImageFieldElement
What is the datatype used for the MultiImageFieldElement? I have the control showing up in the module's edit page, but I can't find what the data type is supposed to be used in the ViewModel or the FluentMappings; I keep getting various casting errors.
This is what I have so far:
Definition: (Works)
MultiImageFieldElement imageField = new MultiImageFieldElement(mainSection.Fields)
ID = "imageFieldControl",
DataFieldName = "Images",
DisplayMode = displayMode,
Title = "Images",
CssClass = "sfFormSeparator sfImageField",
WrapperTag = HtmlTextWriterTag.Li,
;
mainSection.Fields.Add(imageField);
Hi Patrick Herrington,
If talking about eCommerce,
You can use have the model as below.
[DataMember]
public
List<ProductImage> Images
get
return
images ?? (images =
new
List<ProductImage>());
set
images = value;