logo
Published on Dave's Cave (http://squtch.quiet-like-a-panther.org)

Changing Recipe Module

By dave
Created 2005-11-01 15:05

When I first started playin with Drupal, I was excited to see that there was a module for posting recipes to your site. How cool is that?

Well, it didn't take me long to realize that there were lots of problems with it. To start with, there was no way to have a recipe with multi-part ingredient lists. For example, with Kung Pao Chicken, in addition to the main ingredients, there are also lists for the sauce and for the marinade. As it happens, that Kung Pao Chicken recipe was the first one that I wanted to enter.

Even worse, there was a separate field for each ingredient, and the standard form only had room for 6 ingredients. You had to click a check box and hit preview if you wanted to enter more than 6. And it would only add 6 more lines when you did that.

What the hell is the point to that? Why not do it properly and have one big textarea and process the information entered in the textarea? After all, it is a fucking computer program!

Not to mention, that those ingredients were kept in a different table in the database from where the rest of the recipe was kept. Drupal is enough of a processor hog without having to do unnecessary selects from the database instead of putting it all in one table.

Then my friend Mike pointed out that there was no section for required tools. While it really isn't necessary for most recipes, for some of the more complicated ones, it can make a difference to have that list in front of you right away.

Finally, I wanted to have an introduction section where you could put in some text leading in to the recipe. This would also be the teaser text in the lists of recipes. Previously they were using the instruction text for this, and it was really ugly.

I have to clean some things up a bit in the CSS, but I'm happy with the functionality so far. I'll be submitting it back to the drupal site in about a week.


Source URL:
http://squtch.quiet-like-a-panther.org/story/changing_recipe_module-10