Closed (won't fix)
Project:
Recipe
Version:
7.x-1.1
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Aug 2011 at 14:05 UTC
Updated:
17 Dec 2015 at 21:40 UTC
Jump to comment: Most recent
Comments
Comment #1
jvandervort commentedAre you just using taxonomy and not nodes for ingredients? If so, there is no way for the recipe module to know this. You could do some mysql magic and copy your taxonomy ingredients into the recipe_ingredient table though. All you need is the name field. If you've already entered recipes then this would possibly add duplicate ingredients. It also won't "relink" existing recipes to use the new ingredients.
Comment #2
Cray Flatline commentedBTW, why ingredient is linked to the node? :) I just try to understand :) It's logical to be a taxonomy term. So (for example) if i click on the "pork meat", i expect to see list of the recipes with pork meat as one of ingridients, not some node with information about porks.
May be I 'm not understand something? Please find a minute to explain ingredients conception to me. Thanks in advance!
Comment #3
jvandervort commentedThe feature as it is implemented is to link ingredients to "ingredient nodes". This was so people could write up a bunch of supporting information about an ingredient.
Like:
Salt
...history of salt.
where it's found.
how it's mined.
studies about how it is bad for you, etc...
Your right though, ingredient as a taxo term isn't wrong. It could be useful if you site is designed to take advantage of it. That said, Recipe has a view by ingredient index built in. It works pretty well. Look at the recipes -> by ingredient link.
Comment #4
Cray Flatline commentedI've created poll on my website. Most of users answered, that if they see link on the ingredient, they are expecting to see another recipes with this ingredient. Not so many users want to know something new about pork's lifestyle, but everybody want to know how to make not only rice with the pork but also great grilled pork steak. :)
Built in ingredients index is useful, but can i make view to show some page from ingredients index? And what about pathauto? http://domain.com/recipe/bying/8 is not so good for SEO as http://domain.com/ingredients/salt.
I think it's much more logical and useful to make ingredients as taxonomy terms. May I create feature request about it, what do you think? :)
Comment #5
flightrisk commentedI'll give the "node" idea a try, but I find it not at all the way people or Drupal works. I use taxonomy for everything else, so to have to use a node here seems counterintuitive and also disorganized. Now I am going to waste dozens or hundreds of nodes on food ingredients and clutter my list of content?
How do I create a node with an ingredient? Do I add a content type of "article" with a title of "salt"? How do in input all my ingredients?
Also, CryAngel, unless I missed something the "view by ingredient" does work the way you want. If I have a recipe with "milk" and a recipe with "mustard", they both show up under "M". If I click on "Milk" I get all the recipes with milk in them. Unless this feature changed since August.
Comment #6
jvandervort commented@flightrisk,
It depends on what you are trying to do. The "node" idea was strictly for those people that wanted to add extra data about the "ingredient". They wanted history of salt, health ramifications, and general usage, etc... In this aspect an ingredient is __content__ and not taxo. What are you trying to do?
Comment #7
flightrisk commentedAll I really need to do is have a simple ingredient list and an easy way to edit it. I like how the module automatically saves each ingredient the first time it is used. I don't need it, but how do you add all this detail to the ingredients that you mentioned?
Comment #8
jvandervort commentedYou need to add a new content type with type="ingredient".
After that anytime you save a recipe, ingredients with a "title" matching the ingredient name will automatically link. If you've already got a bunch of recipes loaded, you'll have to write a database query to link them all up.
Comment #9
ana.bapz commentedhi i am new with drupal, i need to create a website for a student project and we are created a website about recipe we wanted to add recipes and make a research to find all the recipe that contain one or few ingredients.
I read your comments cause i would like to use taxonomy to classify all the recipes by ingredients , but i have two problems :
- how have a whole database with all the ingredients? (that why i consult your comments but i am sorry i don't understand the way to do it, could try to explain me how to do it)
- how to create a form or a tool to make the research? (i wonder if i could do it with views, but like i said i just begin with drupal and our teacher didn't explain anything about drupal and views is quit complicated module!)
if you have some advice, help to give me it could be really nice!!
thanks
Comment #10
flightrisk commentedHmmm, I don't think this is what I want. It would be a lot easier if there was an option to use Taxonomy instead, but let me explain what I am finding. If I create recipes and add new ingredients, by magic the ingredients are saved somewhere. I don't know where. I want to create this list in advance. I don't want to have to wait until I enter a recipe that uses that ingredient.
When I tried to do what you said, create a content type with a title of "ingredient", that didn't work. When I create a new recipe and go to the ingredient field and start to type the name of the content node I added (say it is "salt") , I expected that I could type s... a... and it would find salt. It did not. I am guessing what this does instead is allow me to create a node called salt in advance and when I create a recipe with salt in it and save it, the word salt becomes a link that takes me to my node about salt. This is a nice feature actually, but not what I need.
To say it a different way, what I think I and a lot of other people are asking for is access to the table of ingredients that get automatically saved when you type them into an ingredient field in a recipe and save them. This should not be a list hidden in the database somewhere, it should be a taxonomy list that I can manually add ingredients to and include in pages I want to create using the Views module.
Comment #11
w00zle commentedI absolutely agree with flightrisk. There definitely needs to be a way to use existing Taxonomy terms as ingredients. I thought that this was what was meant by "support for taxonomy" as mentioned on the front page, but this seems not to be the case. Can anyone actually tell me how this module "supports" taxonomy?
Comment #12
dcam commentedI have no idea what the project page means by taxonomy support. It looks like that text hasn't been updated since before Drupal 7. I'd assume whoever wrote it meant that you could attach term reference fields to the recipe node type. So in other words, I don't think it really means anything.
I'm working on a new version of Recipe that will include better ingredient administration like what flightrisk suggests. I need this really badly too for the recipe site I developed. It will take some time before the new version is ready. I only started on it this week.
Comment #13
jvandervort commentedNah, support for taxonomy means you can categorize recipes (since they are nodes) and use taxonomy. You then can build a site with things like Entree, Appetizers, Organic, vegetarian, etc.. Or use free tagging. Basically core taxonomy support. Ingredients as taxonomy terms still semantically breaks for me since ingredients are content, but to each his own.
Comment #14
seiplax commentedI think using taxonomies also for the single ingredients makes a lot of sense from a semantic web / linked data point of view.
Comment #15
alpp commentedwill the ingredients be taxonomy tags in the next releases? that would be really useful.
Comment #16
dcam commentedAs far as I'm concerned, ingredients are not taxonomy. Taxonomy is made for classification, hence the name. Just because it has handy entity reference, a necessary function for ingredients, doesn't mean that we ought to co-opt it for that purpose.
From my perspective, ingredients ought to be their own type of custom, fieldable entity. They have their own challenges. It's easy to get a sense of that by reading over the module's issue queue. There are a lot of issues from people wishing that ingredients did this, that, or something else. After giving the matter a lot of thought, I don't believe these problems can be solved just by forcing the ingredients into a core entity. Yes, they do have properties in common with the way taxonomy terms work. Some people might even want them to have some content which suggests that they might be nodes, as jvandervort mentions in #3. In the end, neither implementation will fix everything.
I've started trying to write ingredient entity code, but I haven't gotten very far yet. Most of my Drupal contributor time lately has been taken up by working on core. I have another project at work coming down the pipe that will require Recipe, however, and I'm not thrilled with the idea of implementing it with the old 1.x version (again). So I will probably have to get back to this soon.
Comment #17
alpp commentedthe reason i was asking is, it would be very useful to use search api and/or other tools, if ingredients were taxonomies. i think an ingredient based search is essential, and the ingredient view within recipe module is a bit far away from doing this.
Comment #18
kevinquillen commentedIt would be nice to be able to mark a 'commerce product' as an ingredient, so recipes are directly correlated to an active inventory of purchasable products. Otherwise you are looking at double data entry or more..
Comment #19
zulljin commentedDid someone find a decision?
Comment #20
dcam commentedAs mentioned in #16, ingredients have been converted into a new entity type for the 8.x-2.x branch. They can be fielded and displayed any way that anyone wishes.
If anyone still really, really wants Ingredients to be Taxonomy, then my suggestion is to make your own ingredient fields. It should be pretty easy to do using the Field Collection or ECK + Inline Entity Form modules (they do the same, basic thing). Set up a Number, Select list, Taxonomy reference, and short Text fields in the collection/entity, add a little theming, and you have yourself a basic field that will use an ingredient taxonomy for reference.