I'm trying to do something and I'm not sure if views_attach is the answer to what I'm looking for, but I think it is. I basically want to attach a view to a node, but the problem for me is setting up the view correctly.
Here's an example of something I'm trying to do:
I have:
- A chef node (chef's make their own profile, node limit used to limit to 1, I'm not using profile node because I'd like to keep them nodes)
- A recipe node (chef's make different recipes)
I'd like to use views_attach to attach a view to the chef node, so it shows all the recipes created by the owner of the chef node that it's attached to (which could be multiple recipes). So, in other words, the view would filter on recipe content type, and the owner of the recipe node(s) would need to be the owner of the chef node that the view is attached to.
I figure once I do that, I could also link the recipes back to the chef that created it (basically, view that filters based on the owner of the node it's attached to, to the chef content type).
Both chef and recipe nodes have a node reference field. I set up an argument, and configured the default value of that argument to "Node ID from URL." I'm not sure what this step means: "Set the display to show on node types that are pointed to by that nodereference field." - I did select Node for validator options, and selected the node type, but I'm not sure if that's what was meant.
Any tips? Thank you -
Comments
Comment #1
keva commentedto "Set the display to show on node types that are pointed to by that nodereference field.":
Under "Defaults", there's a display option called "Node Content"
Choose that, click "Add Display"
Under Node Content Settings, change "Node Type" to the type of view that should contain the attached view.
Comment #2
drewish commented