Project:Recipe
Version:master
Component:Code
Category:support request
Priority:normal
Assigned:tzoscott
Status:closed (fixed)

Issue Summary

I would like to have a block with the content of the main recipe page. how is this possible?

Comments

#1

Status:active» closed (fixed)

closed on age - if still active - please resubmit

#2

Status:closed (fixed)» active

I was looking for this today. It would be a cool feature to have. Latest recipes, feature recipes, holiday recipes etc etc

#3

Use views.

#4

If I was a coder or was very much conversant with Views, that would be no problem. ;)
Any more specific information on how to go about it?
They would certainly be cool features.

#5

There's no need to be a coder! Views is controlled via the web, like other Drupal modules. If you search Google for Drupal views tips, etc, you'll find a lot of introductions to how it works. It takes a little time to learn the basics, but you should be able to figure it out in an hour or so.

#6

Component:Miscellaneous» Code
Assigned to:Anonymous» tzoscott

Tracerhand, thanks for trying to help but your answer re: views is not correct.

You can only create Views IF the database tables are described (in code) to Views.
Views works like magic on Drupal core because all those tables are described to Views.. you just don't see that code.

In the case of Recipe module, the tables are not described to views - there is no such code.
It would require programming to make Recipe become Views-aware.

Making Recipe Views-aware is not trivial; I have been trying to do so myself -- see #672258: Patch to give Recipe module some Views2 support .
I can expose all of the Recipe tables to Views now. You could in theory design a Views block display.

I say "in theory" because while you can View all the data for a Recipe by it's NID, the nature of the SQL JOIN causes every datafield to be duplicated (you'll get N rows each containing say Instructions, Yield etc, where 'N' was the number of ingredients in that recipe). There's a problem and solution for that data duplication issue (rather, I know the solution exists, but I am not conversant enough in writing Views Handlers to solve this correctly, at least for now).

Assigning to myself. If I get the Views fully working, the problem is solved. I might also hack in block support, which would be trivial.

#7

tzoscott,

Thank you for taking this on.

I was also thinking if you get the Views side working - Recipes would also now have a RSS feed by using the Views toolbox

#8

Status:active» fixed

OK, I didn't even see this until now, but there IS block support in Recipes.
The block support must have been added to recipe after this feature request..

Block could not display the entire recipe content. This feature looks completed.

If you need something changed on block display, please submit a new issue. Thanks.

Note that Views support is coming and that will make everything more configurable..

#9

Hi

If I may ask, will it be possible to simply import the current recipes to the new module?

#10

Hi lionheart8,

That's good to ask because "-dev" usually means "not ready for public use".
We've managed to keep everything stable in -dev.. but that might not ALWAYS be true.
For that reason alone we should probably tag a new version, just so we don't get everyone hooked on -dev...

If you can't wait, you can upgrade to dev. If you can wait a little bit more, we'll finish some new features and then tag a new version.

#11

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here