I've constantly run into scenarios where I need to do some very basic display using node reference and views. But my search for a good tutorial or forum question/answer has been fruitless!! Let me explain what I am trying to accomplish:
I have a content type called quotes. This consists if a title and a body (author and quote).
On my PAGE content type I have added a nodereference to the quote content. This allows the user to pick one quote from the list of available quotes to show up on that particular page.
In Views, I've made a block called quotes. I'm trying to get the quotes to show up only on the pages where they were selected. So far Ive been able to get them to show up on all pages or no pages, but never just the pages assigned to them.
I've tried various combinations of relationships/arguments (which I don't really understand, either) to no avail!
Can anyone help me or point me in the direction of a good tutorial? I appreciate it! :)
Comments
=-=
if you've not seen them yet ...
videocast on views2 arguments = http://gotdrupal.com/videos/drupal-views-arguments
videocast on views2 relationships = http://drewish.com/node/127
edit: in the views2 relationships vid drewish uses node reference
=-=
might also want to investigate http://drupal.org/project/nodereference_url
Thanks for the links! I
Thanks for the links! I hadn't seen these yet. I have a better understanding now of Arguments and Relationships but these screencasts are dealing with much more complicated scenarios... I'm still not sure how to apply all this to my scenario.
I believe that I am having a
I believe that I am having a similar problem. I have a node reference on a "beer" content type. This references a store that you can find that particular beer in. I want to display in a block the stores that are selected (Will be added locations and turning it into a gmap, but testing I just want to see the list for now).
Well I feel like an idiot.
Well I feel like an idiot. Finally figured out that the argument just has to be Nid, then provide default argument as Node ID from URL. That limits the info to the current node with node reference is a field. I ungrouped the fields and I got my list.
Can you go over what you have
Can you go over what you have in your Relationships, Arguments, and Fields?
I presume under Arguments is just nid.
Yes my argument is just nid,
Yes my argument is just nid, and then Node ID from URL.
My fields are the node reference, the options I have are "title (no links)" as the output format and I made sure to uncheck "Group multiple values" (so each checked node is a new row). I do not use a relationship for this field.
I also have latitude and longitude fields and have a relationship to the node reference, though this is not what you are trying to do hopefully that gives you an idea on how that would work.
similar issue...
I'm trying to do a similar thing; following your example, I have stores and beer. Assume that each beer is beeing sold only in a store, I put a node reference field "linked" to the store. I would like to have a view showing all stores where, if I click on one of them, I'll go in another page with a view showing the list of beer for that store.
I cannot do it because the second view can take as argument only the Nid of the store while the first view has only [title] as pattern that can be used in each item link.
Somebody has a solution for this? I think that it should be a common issue, but I can't find documentation about this...
Thanks in advance
I'm still not having any
I'm still not having any luck...
My latest sequence is
Relationships: The Node Referemce
Arguments: The Title (node title), I have Clean URLs on so the argument is the page's clean URL
Fields: Title, Body, Nodereference
Sort: Published, Quote content type