Essentially what I want to do is create a menu tab that when clicked will list all the reviews of that particular node. If I'm on node 5 and click the reviews tab it should show me all the reviews linked to node 5.
I've come across two problems I'm not sure how to fix. Currently I have a review content type that uses the url reference widget. If I click add review from that particular node, the review will be referenced to that node. What I have right now is a view with page display with a menu tab and path node/%/reviews. I set up a relationship with the field that is url reference. The first problem is the reviews tab is showing up, but it also shows on every single content type. How can I make it so that it only shows on one content type? The second problem is even though I can add fields from the review content type the data doesn't actually show up from the review.
I'm pretty sure I'm doing something wrong since if I go to the actual review and click reviews (which that button shouldn't be showing) it shows me the review data.
Any ideas on what I'm not setting up right? Thanks.
Comments
Comment #1
dawehnerSet a nodetype filter?
To the second problem, i guess you aren't filter right. So nodes with no nodereference gets displayed.
Comment #2
Platinum commentedHmm, setting up a nodetype filter stops the data from showing up on the review, but the link to the menu still exists.
For the second problem it's not the problem that nodes with no nodereference get displayed, but no data shows up at all. If I remove the node reference relationship however then I will get a list of labels, but with blank content. Once I add the node reference relationship then even the labels disappear and I see nothing on the page.
Comment #3
dawehnerDid you set the filter to the relationship?
Its always good if you export your view, to see what you have tryed to do.
Comment #4
Platinum commentedHmm, I deleted the whole view and just cloned a similar view and now it appears to be working, even though the settings looked the same. I can now see all the data related to that node. The tab still shows on every content type though, I tried placing:
if($argument == 'story'){
return TRUE;
}
in the argument php part, but doesn't seem to work.
Comment #5
Platinum commentedOh, I got it to work. I think I misunderstood when you said node type "filter", but I selected node type as a "validator" and checked only the story and now it works. Thanks for the help.