Attach just an image as a new property for an entry

I’m new to ORM, and I’m not really sure where to go with this. I was going to use the Excerpt field to hold an image that will later be used for an entry when searched on the site. Problem is, you can put a slew of text in there and have it break things. The folks doing actual content entry, apparently, cannot be trusted with this much power ;). I could try and add a image upload box, however, I’ve really no clue how to make it actually work as all the stuff that captures and does the save is happening somewhere in ColdBox (or at least, I think that’s what’s happening). Is there any easy way to add an image upload box to an Entry? I get that there’s a media manager and the CKEditor bits, but this doesn’t need to be any more complex than just a straight image upload/capture.

This may not be as difficult as it looked on first brush. I guess if I put the CFFILE logic in the contentbox-admin\handlers\entries.cfc before that save finished (and capture the image path\name as the field content), it may just be pretty easy to pull off.

Matthew, you may find this more interesting.

The idea was to provide a way to have posts that where related, since doing this Luis has eventually now added this support. However, if anything this post shows is that you could very easily take the concept to do with it what you please. In your case would be a huge contender to provide a better visual representation than an input field for value key pairs.

This was also used in another example, where I used the way Wordpress works, with the likes of feature images. Where you could apply a widget to display the image and provide a mechanism to modify this using the media manager.

No need to touch core code.

Mathew we have done this in the past for clients. You need to do your own module and listen to save events to save and then listen to the UI events to present a nice uploader

Luis Majano
Ortus Solutions, Corp

P/F: 1-888-557-8057
Direct: (909) 248-3408

ColdBox Platform:
ContentBox Platform:
Linked In:
Social: | | |

That is awesome… but I’m missing one small piece here. Mostly in that, I’ve no idea where to start with doing this. Given that ContentBox is an extension/addition to ColdBox, should I be looking for ColdBox tutorials? I don’t recall seeing any (tutorials) off the main ContentBox site and don’t really have a good handle on where to begin doing things the “correct” way vs doing it the “just getting it done for now” way.

Start with this webinar:

Any and all documentation on ColdBox modules are applicable to ContentBox. The difference is just that a ContentBox module runs inside ContentBox and has access to additional interception points, models/services, etc.

Also, there is a collection of ContentBox modules on ForgeBox. You can tear these apart to see how they work:



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:

Good deal, thanks!