Why not media custom fields in modules?

Posted by Community Admin on 04-Aug-2018 15:58

Why not media custom fields in modules?

All Replies

Posted by Community Admin on 19-Sep-2013 00:00

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?

Posted by Community Admin on 19-Sep-2013 00:00

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.

Posted by Community Admin on 19-Sep-2013 00:00

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.

Posted by Community Admin on 19-Sep-2013 00:00

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.

Posted by Community Admin on 19-Sep-2013 00:00

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
www.telerik.com/.../pits.aspx

There should be a multipage fieldcontrol in Sitefinity
www.telerik.com/.../pits.aspx

Kind regards,
Daniel

Posted by Community Admin on 19-Sep-2013 00:00

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!

Posted by Community Admin on 19-Sep-2013 00:00

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. 

Posted by Community Admin on 20-Sep-2013 00:00

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... 

This thread is closed