I have a node (node a) with which various other nodes (node b/c/d/e) references.
I can create a view with an argument as the node I’m viewing, (node a), and get a list of the nodes that are referencing that node.
Basically on node a viewing a list of node b-e.
I want to create a views page just for the node references of that node. But how can I pass on the argument to the new page?
Thanks.
Edit: I apologize for the confusing question.
Basically I have a movie node. I have many reviews referencing the movie node.
On the movie node I use argument: content: review_of to get a listing of reviews for that movie.
This is great, but because on the movie node there’s only a few reviews, I need a page where I can see all the reviews per that movie. The question is passing on the argument for the movie from the view block (say, 3 reviews for the movie) to a view page (with all the reviews).
Ideally the url for the views page would be: /movies/movie-name/reviews
I have tried this with relationships as in Owen’s answer, but was not able to make this work.
If I understand what you’re saying, you’re wanting to create a Views page that allows you to view nodes associated with a parent node (via a CCK Node Reference field)?
Once you setup your View, you can just pass the nid (or title, or whatever field you choose as your argument), to the URL.
So, assuming you have a Views page setup at: http://yourinstall.com/related-nodes
Just pass the argument in: http://yourinstall.com/related-nodes/5
The above (assuming your relationships / arguments are correct) will show all associated nodes with NID 5.
Here’s an image of the views configuration I used.
You’ll note the “path” setting on the views is “movies/%/reviews”. I had two movies “Movie One” and “Movie Two”, with a few reviews on each. You can then use http://yourinstall.com/movies/movie-one/reviews, etc… to see the titles of the reviews.
edit: Ok, so the clarification of the problem is, you have a Views block which displays a list of Reviews specific to a Movie. As well, you’d like the “more…” link to link to a Views page which display all the Reviews specific to that Movie.
This is doable via the Views admin, but does involve a bit of PHP code.
The code you use is:
In essence, the Views block acts the same (expects a Movie node title), but will use the code above to try pull the title from the URL (note this works fine with path aliases). The Movie node title is placed into the more link as well (see the above image) in the format “movies/[movie-title]/reviews”, which will link to the Views page as expected.