Custom field in module
Hi,
I've just been through the Creating image selector for the news module blog, and have the selector working in the news module. I want to reuse this field on a custom module, but a custom module doesn't even have the link in the sidebar for "Custom fields". From looking at the latest products module it looks like the SimpleImageField has been coded into the module (see code example below), however this doesn't allow me to add fields to my custom modules at a later date per project.
var thumbnailField =
new
SimpleImageFieldElement(mainSection.Fields)
ID =
"thumbnailFieldControl"
,
FieldName =
"ThumbUrl"
,
DataFieldName =
"ThumbUrl"
,
FieldType =
typeof
(SimpleImageField),
DisplayMode = displayMode,
Title =
"Thumbnail"
,
CssClass =
"sfTitleField"
,
ResourceClassId =
typeof
(ProductsResources).Name
;
mainSection.Fields.Add(thumbnailField);
Hello Higgsy,
Please refer to this post to have Custom Fields option in custom modules.
Cheers,
Duneel