I am Offline developing a free recipe guide which would provide free recipes and would offer ingredients in the recipe for sale.
I have created content ONE - INGREDIENTS FOR SALE as shippable products
I have created content TWO - RECIPE as story with one field of ingredients and type as node references of content2 with selection upto ten ingredients allowed.
I am able to successfully display one recipe per page.
Now I want to display the ingredients as sale on the same page in Right Sidebar in Blocks. Please help how to do so.
Example
Ingredients1 - SALT
Ingredients2 - Sugar
Ingredients3 - Chilli
Ingredients4 - Pepper
Recipe1 - Ingredients - SALT + Sugar (Display of two products)
Recipe2 - Ingredients - SALT + Chilli (Display of two products)
Recipe3 - Ingredients - SALT + Chilli + Sugar + Pepper (Display of four products)
Thanks in Advance
Comments
Comment #1
gordon commentedYes you can do this with cck and views 2.
From the receipies use the node reference field to link the receipt to the ingredience and then you can use views to display the list.
Comment #2
gordon commentedComment #3
Rugman commentedTons of thanks for your info.
Tried fiddling with views with following settings:-
Relationship - node reference fields - ALL
Fields - Node reference - Title Link+Teasure
No filters, no sorts.
Total options for node reference selection while posting new recipe is 10 (Total 10 ingredients available)
Used node references in three recipes is 6 different one's
Case 1 (Tried using relationship & Fields both in default and override modes)
Get following results on page of recipe No1 containing Salt and Sugar only (These six are used in three recipes)
1. Salt
2. Sugar
3. Chilli
4. pepper
5. Sugarcane
6. Vinegar
I want to display only Salt & Sugar on node of Recipe one i.e. to offer products which are in that recipe.
Case 2 (When relationship is removed) (Tried in both default & Override modes)
Get following results on page of recipe No 1 containing Salt & Sugar only
1. Chilli
2. pepper
3.
4.
5.
6.
7.
8.
9.
10.
(Last eight are empty) - Chilli & Pepper are not contained in recipe no 1 !!!
Please advise where is my mistake.
Thanks in Advance