When you update the yield, then click the printer-friendly version, you often loose your custom yield value. This patch adds a GET parameter to the link and also adds some basic functionality to look for that get link in theme_recipe_node(). Note that I had to restructure that logic a bit to make it work correctly. The end result is that when you update the yield, then click the printer-friendly link, the next page has the yield and ingredients as you saw them in the previous page.

The one thing I didn't get nailed down was that when you have a yield GET param in the url string, then use the form to update the yield, the old yield still stays in the url. The yield in the POST data is used correctly, it's just that it could be a bit confusing. Ideally, the posting of the form should call a submit function that uses a drupal_goto to set the param. This would make it easy to bookmark recipes with custom yield values. This seemed like a lesser evil than what is fixed above, so I figured I'd post as is and see if someone can polish it up before I get back to it.

Patch needs review.

CommentFileSizeAuthor
recipe_print_recalc_v1.patch2.87 KBseanbfuller

Comments

jvandervort’s picture

Status: Needs review » Closed (won't fix)

Recipe 5.x branch moved to unsupported.