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

Forums / Developing with Sitefinity / Why not media custom fields in modules?

Why not media custom fields in modules?

8 posts, 0 answered
  1. Jules
    Jules avatar
    65 posts
    Registered:
    20 Jul 2005
    19 Sep 2013
    Link to this post
    I love that the module builder lets you add media (images, documents) to your custom-built modules. And I love that the built-in modules let you add custom fields. But why can't you add media types (images, documents) as custom fields in those built-in modules?
    All I really want is to add a link to an image to the news module. I know I can write something custom, but it's a pain and why would I when SF already has a great dialog for selecting and adding an image???
    Maybe if someone would explain the rationale I could let this idea go. Thoughts? Suggestions?
  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    19 Sep 2013 in reply to Jules
    Link to this post
    Easy answer is that the native modules were done first and they haven't gone back to add them in....sadly :/  I'd expect this in 6.3 or 6.4 though, supposed to be polish releases.
  3. Jules
    Jules avatar
    65 posts
    Registered:
    20 Jul 2005
    19 Sep 2013
    Link to this post
    If that's really the case, someone at SF can be my best friend if they'll roll it into the next release (and of course, that release comes soon enough for me to implement in my current project). Given the huge number of sites out there with a rotator-type display of news laid over a hero image, I'm thinking I can't be alone in wanting this. And since the current project I'm working on is an upgrade to 6.x from 3.7 (which had an image link in news items), it'd be helpful and save me from explaining to my customer why in this one module the migration from 3.7 to 6.x is a small step backward.
  4. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    19 Sep 2013 in reply to Jules
    Link to this post
    Julia,

    In the meantime you have two options:

    1) Add a custom field, make the 'Interface type widget for entering data' custom and give it the type Telerik.Sitefinity.Web.UI.Fields.ImageField 

    Drawback is you can't delete an image once you've added one, but it's a quick solution and upside is nobody will ever be able to accidentally remove the image ;)

    2) Don't re invent the wheel but use the code Sitefinity support has provided in another thread:
    http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/adding-image-selector-to-news-module#6GrnqCufJk6LCuygCPgZwg until you're certain what's coming in the next few months.
  5. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    19 Sep 2013 in reply to Jules
    Link to this post
    Hi Julia,

    Of course you could implement one of the custom workarounds for this issue you have. This is a topic that goes way back, even for the MediaSelector was introduced within Sitefinity.

    I would suggest that you would also vote for these issues in the Issue Tracker and maybe add it to the attention of the community and Sitefinity :)

    Add media selector fields in content based modules
    http://www.telerik.com/support/pits.aspx#/details/Issue=14322

    There should be a multipage fieldcontrol in Sitefinity
    http://www.telerik.com/support/pits.aspx#/details/Issue=14894

    Kind regards,
    Daniel

  6. Jules
    Jules avatar
    65 posts
    Registered:
    20 Jul 2005
    19 Sep 2013 in reply to Daniel Plomp
    Link to this post
    Daniel, 
    You're right. I should vote in the PITS. ....  And I just did. Too bad my vote brings it to only 22 for the media selector fields in content-based modules. Hopefully some others will read this and go vote!  
    Jochem,
    I'm going to take a look at your second suggestion. I know I've looked at it before, but I'll revisit it again. For this project it just may not be something I can avoid.
    Thanks!
  7. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    19 Sep 2013 in reply to Jules
    Link to this post
    Julia,

    Good luck! Can you keep us in the loop?
    So far I've mostly preferred option one as it's 'upgrade safe' and images are usually required so the lack of ability to remove pictures (you can change - just not set to 'null') often outstrips a coded solution. 
  8. Jules
    Jules avatar
    65 posts
    Registered:
    20 Jul 2005
    20 Sep 2013
    Link to this post
    Ok. Update. I took your advice, Jochem, and implemented option 1. Pretty smooth and easy. It saves the image's URL into the news table, which is fine. Now.... anyone have any ideas about the next step, which is making this work with the marvelous new thumbnails?

    Oh, also wanted to share that in addition to voting for the PITS issue, I mentioned this to my new SF rep who emailed me to introduce himself yesterday. Poor guy, probably wasn't expecting that his email coincided with one of the few times I have issues... 
8 posts, 0 answered