1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Custom module needs selector to select multiple images

Custom module needs selector to select multiple images

6 posts, 0 answered
  1. Denis
    Denis avatar
    105 posts
    Registered:
    27 Feb 2009
    11 Jan 2013
    Link to this post
    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!
  2. Nikolay Dimitrov
    Nikolay Dimitrov avatar
    17 posts
    Registered:
    17 Mar 2017
    14 Jan 2013
    Link to this post
    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
  3. Denis
    Denis avatar
    105 posts
    Registered:
    27 Feb 2009
    14 Jan 2013 in reply to Nikolay Dimitrov
    Link to this post
    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.
  4. Denis
    Denis avatar
    105 posts
    Registered:
    27 Feb 2009
    26 Feb 2013 in reply to Denis
    Link to this post
    Telerik, any ideas about my previous post? Any feed back would be much appreciated. Thanks, Denis.
  5. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    28 Feb 2013
    Link to this post
    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 ):

    http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/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
  6. Denis
    Denis avatar
    105 posts
    Registered:
    27 Feb 2009
    28 Feb 2013 in reply to Victor Velev
    Link to this post

    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.

6 posts, 0 answered