MultiImageFieldElement?

Posted by Community Admin on 04-Aug-2018 19:00

MultiImageFieldElement?

All Replies

Posted by Community Admin on 12-Oct-2011 00:00

Can anyone please let us know how can we use MultiImageFieldElement in our modules? Its one of the most needed functionality so please try to give some working example.

Posted by Community Admin on 17-Oct-2011 00:00

Hello Saad,

 The MultiImageFieldElement is not meant for generic content based modules. It is used in the eCommerce module and has a number of prerequisites that have to be implemented in the data provider and the web service for managing your items.
An easier approach is to create a text type field and store image IDs in it. You can use RadGridClientBinder for the backend interface and populate image IDs in a string field.
You can try developing such a control using this blog post:
http://www.sitefinity.com/blogs/slavoingilizov/posts/11-02-11/creating_a_thumbnail_selector_for_news_items.aspx
If you need further assistance, you can get back to me.

All the best,
Svetoslav Petsov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 17-Oct-2011 00:00

Well, I have already seen the blog post you`ve sent. Its good but MultiImageFieldElement is better.
I believe that custom module with such functionality (one or more images associated with each item) would also be easy to query for items and their images, basically a pure approach.

I did implement the link you have sent. But still I would want to have what you guys have implemented in ecommerce products module. 

A small example or brief on pre-requisites would be appreciated a lot. And I know lot of people would be looking for this.

Posted by Community Admin on 21-Oct-2011 00:00

Hello Saad,

 I made a multi image selector field control for you. Here's the general idea:
This is a field control that inherits from TextField. In the template of the field I have added a few controls, one of which is a Grid that uses a GridBinder to get images through our Content service and bind them to the Grid. In the textbox of the field, I am keeping an array of the GUIDs of all images that are added. What I change when deleting/adding a new image is just the FilterExpression of the GridBinder which is used to filter the images that are returned by the content service. It's a bit complicated, so if you have any questions, feel free to ask (or if you find any bugs).
In order to install the control, add a reference to the assembly of the control, then add a VirtualPath, using the VirtualPathProvider so that the embedded templates/scripts can be loaded from the control's assembly.  The Virtual Path that should be registered is ~/Ctrls/* (check the screenshot to see how to add it):



Next, go to CustomFields (for News for example) and add a field of type LongText, specify a title that you wish and add a CustomWidget for displaying data of type:
Controls.ImageSelector:

Hope the control suits your needs.

Best wishes,
Svetoslav Petsov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed