Custom module needs selector to select multiple images

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

Custom module needs selector to select multiple images

All Replies

Posted by Community Admin on 11-Jan-2013 00:00

I have custom module I'm wondering if there is anything in the Sitefinity that would let me to easily (or not) associate several images with my module? Maybe MediaFields can help me with this?

This is maybe obvious, but I still didn't find the answer...
Thanks!

Posted by Community Admin on 14-Jan-2013 00:00

Hi Denis,

In order to help you I would need some more information.
Is that a dynamic module made by using Module Builder or is it a custom one, created in some different way?


Kind regards,
Nikolay Dimitrov
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 14-Jan-2013 00:00

Hi Nikolay,

This is a custom module created based on Products module from SDK.
I know how to create one-to-one relation between my module and image:

type.Fields.Add(ContentLinksExtensions.CreateContentLinkField("ItemThumbnail", "OpenAccessDataProvider", metaMan, RelationshipType.OneToOne));
And I use ImageFieldElement in Definitions.

But what if I need OneToMany relation between my module and Images. Or even better, lets make it generic: OneToMany between my module and any other module?

I noticed that when you create link field you can pass RelationshipType.OneToMany parameter. But what would be definition and client scripts in this case?

Also I found this blog where you can simply store array of GUIDs in the property.

What would be a best solution here?

Thanks,
Denis.

Posted by Community Admin on 26-Feb-2013 00:00

Telerik, any ideas about my previous post? Any feed back would be much appreciated. Thanks, Denis.

Posted by Community Admin on 28-Feb-2013 00:00

Hi Denis,

There is a forum thread which discusses the implementation of a multiimagefield ( there is code and steps to register the control in the thread ):

www.sitefinity.com/.../multiimagefieldelement

Kind regards,
Victor Velev
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 28-Feb-2013 00:00

Hi Victor,

Yeah, I'm aware about this approach in the post you referred. It is two years old and I was hoping that now sitefinity provides something better than storing guids in a text field.
Looks like there is no good way to reuse RelationshipType.OneToMany? In what situations this relation type is used at all? I didn't find too much documentation about it...

Thanks, Denis.

This thread is closed