Inline Node Creation

raymond8505x2 - April 21, 2009 - 21:17

I'm new to Drupal, but I think I've exhausted my other methods of solving this- handbook, modules page, third party tutorials- before coming to bug you guys.

I'm using Drupal to create a tool in which I can track my recipes, their ingredients, the cost of each ingredient as well as its total volume and price and the cost of each serving of a recipe.

So I've created:

an Item Content type which has custom fields for measurement units and price.

an ingredient Content Type which has a custom field for the amount of the particular Item to use in a recipe and a node reference for the particular item

a recipe type with unlimited node references for ingredients, and a servings field.

However my problem is that when you want to add a new ingredient when making a recipe, first you have to make each ingredient then create your recipe and add all your created ingredients. Not too mention, this seems completely impractical because an ingredient is just an item with an extra field tacked on for amount.

I've looked at views, view reference, subforms and subform_element related stuff, but I'm not sure what the solution her is.

Is there a module to do inline content creation, so that every time I add an ingredient node to a recipe I can fill in the amount and pick the item?

I feel like subforms was somewhat the right track, but then I thought maybe I can create a view that has the content creation page for an ingredient and then create a view reference field in the recipe node?

Thanks for your patience and help.

Edit: As is generally the case, I don't make any break throughs until I post a question on a forum. It seems like what I want is something like add node or add n reference but both seem long abandoned and not for Drupal 6

It seems like subform is the right direction?

I have not tried it but

nevets - April 21, 2009 - 21:26

I have not tried it but Popups: Add and Reference may do the trick.

Flexifield?

pauldawg - September 4, 2009 - 21:24

Seems like maybe you don't need a node to store an amount of an igredient. Rather, maybe you just need to use a flexifield and have one of the fields be a number, one be a unit, and one be the ingredient. The ingredient itself could even be a taxonomy widget allowing freeform tagging, and then you could hook up the Taxonomy Node module and Taxonomy Image module so that newly created terms will get a new node and/or image...

Haven't tried this of course, and who knows whether all of these things would actually hook up correctly.

 
 

Drupal is a registered trademark of Dries Buytaert.