ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Creating a "one-to-many" relationship with entries/pictures

March 26, 2012 12:24pm

Subscribe [3]
  • #1 / Mar 26, 2012 12:24pm

    ericandrewscott

    12 posts

    It has been a while since I’ve used EE on a project. This is my first 2.x project, and I want to do a gallery on a per portfolio item level. For instance, I have a channel set up for a portfolio, that includes a title, description, small image, and large image. I would like it to be large images, and allow the user to upload as many photos as they want per project, and then display them in a gallery type set up on the page, obviously without creating 10 channel fields for optional images. I’m sure there is an easy way to do this that I don’t know about. Could someone please educate me? Furthermore, I would like each image in the image set to have a small and large version of the image.

  • #2 / Mar 26, 2012 1:37pm

    Andrew Fairlie

    126 posts

    Could I reccomend the “Assets” add-on from Pixel and Tonic to make a “Gallery” field. http://devot-ee.com/add-ons/assets

    I’d also suggest instead of having multiple size fields, just have the one and use CE:Img to resize on the fly. http://devot-ee.com/add-ons/ce-image

    When it comes to EE 2, you’ll find a couple of add-ons that become a nearly essential tool in your arsenal. Both of these are in mine 😊

  • #3 / Mar 26, 2012 2:39pm

    ericandrewscott

    12 posts

    Thanks. The different sizes have different aspect rations, so I’m trying not to do any post-image formatting.

    As far as the Assets add-ons, you can place as many images as you want in there? Does it then create an array of sorts for filenames? Also, how to you justify to your clients fees for add-ons after buying the license. Some of my clients are price conscious and would probably complain about additional fees. Do you just charge it as an hour or two of work, or do you actually tell them about the add-on cost?

  • #4 / Mar 26, 2012 3:01pm

    Andrew Fairlie

    126 posts

    It’s worth reading their documentation - it’ll help you get a good understanding of what the product is.

    Regarding licenses we provide a shopping list at the beginning of a product. We don’t own licenses, why should we? It’s not ours. We ask clients to buy it and they own it 100%.

    I don’t think we’ve ever had to justify why we suggest a particular plugin - clients trust our word and because we’re as transparent as you can be about it they seem fine with it.

    But what it comes down to is money. What is your hourly rate? How long would it take for you to build something like Assets for this client? Chances are the $55 is less than that.

    Hope that helps 😊

  • #5 / Mar 26, 2012 3:29pm

    ericandrewscott

    12 posts

    Oh yeah, absolutely. It would take me quite a while to build something like that. Most often, I am very transparent with clients, reflecting costs to me with no markup and only charging for the setup time. Cost efficient + time efficient = happy client. Every now and then though, you get clients that you can tell are going to be sticklers with budget, and in that case, I would just lump that $55 into an hourly cost of setting up that channel and not even deal with it. It’s gotta be done, and no matter how much cheaper that cost is than building it from scratch, they see the dollar sign and get cranky about it. Those are the clients I try to weed out in the project discovery phase 😉

  • #6 / Mar 26, 2012 3:33pm

    Andrew Fairlie

    126 posts

    Good stuff. Let us know how you get on.

  • #7 / Mar 27, 2012 10:54am

    Shane Eckert

    7174 posts

    Hey ericandrewscott,

    I am glad to see that Andrew was able to point you in the right direction.

    Thanks Andrew!

    Is there anything I can to help?

    Cheers,

  • #8 / Mar 27, 2012 11:08am

    ericandrewscott

    12 posts

    Thanks for checking in, Shane!

    I am going to end up going with the solution Andrew spoke of, but I was wondering if there is anything in the feature requests regarding a one-to-many with entries?

    For instance, I do a decent amount of Drupal 7 work (Don’t tar & feather me), and they have a way that when you add their equivalent of an “entry”, that you can create a one-to-many relationship with image assets. This is also something I used to wonder about back in the days of EE 1.6 and beyond.

  • #9 / Mar 30, 2012 4:57pm

    Shane Eckert

    7174 posts

    Hello ericandrewscott,

    I am glad that you can use one of the suggestions. That’s awesome.

    I am not sure if there is a Feature Request for that yet, but feel free to make one!

    Have a great weekend!

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases