Thumbnail field for custom content module
Hello,
I created custom content module regarding this post.
Now I'm trying to add field to my content module that would hold thumbnail.
I added thumbnail selector project from this post.
Now I'm trying to use this selector to add thumbnail field.
For custom content item I defined new field (+ all appropriate mappings for openaccess):
/// <summary>
/// item thumbnail
/// </summary>
[DataMember]
public
string
ItemThumbnail
get
return
this
.itemThumbnail;
set
this
.itemThumbnail = value;
// ItemThumbnail field
var itemThumbnailField =
new
Telerik.Sitefinity.Samples.SimpleImageFieldElement(mainSection.Fields)
ID =
"itemThumbnailFieldControl"
,
DataFieldName =
"ItemThumbnail"
,
DisplayMode = displayMode,
Title =
"Item Thumbnail"
,
CssClass =
"sfTitleField"
,
WrapperTag = HtmlTextWriterTag.Li
;
itemThumbnailField.ValidatorConfig =
new
ValidatorDefinitionElement(itemThumbnailField)
Required =
false
;
mainSection.Fields.Add(itemThumbnailField);
Telerik.Sitefinity.Samples.SimpleImageFieldElement
from this post.Yep, known issue, fixed in 4.2 Hotfix 1 and certainly in the new 4.2 SP1 (unless it's a new bug :)
I think I found solution. I just used ImageFieldElement.
This post is acually workaround for news content items. But if you create your own content module you have to use ImageFieldElement.
Steve, you are right, it was fixed in SP1!