I’m building a cookery website for a client, who’s decided to use ExpressionEngine (not my choice, I did try and opt for something different). One aspect of the website is the ability for logged-in members to add recipes.
So far, I’ve create a channel for recipes and a channel for ingredients. I’ve then extended the Member module and create a SAEF with the Safecracker module so logged-in users can add a recipe entry. However, where I’m stuck is trying to create a one-to-many relationships, where a recipe can have many ingredients, and an ingredient can belong to many recipes.
Does ExpressionEngine support this out of the box and I’m missing it? Or does I have to do some hacking? Or am I going over this in completely the wrong manner?
Any help would be greatly appreciated.
Your best bet is to use a 3rd party commercial add-on called Playa (“Playa” being a playful take on 1-to-many relationships). It’s from Pixel & Tonic and will do exactly what you need. Their add-ons and support are top-notch.
That way your client will have the feature they need with an optimal interface on both the back end control panel and within the front-end safecracker form. No hacking needed for this and maintainability is much more solid over time as opposed to hacking at EE’s core.