Closed (fixed)
Project:
Relation
Version:
7.x-1.x-dev
Component:
Views
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2012 at 18:13 UTC
Updated:
17 May 2013 at 08:50 UTC
Hi there.....
In a views where I use fields from a node type I need to fetch fields from another node type that the same user have made...
But I cant figure out how to to this can anyone point me in the right direction...
My setup is that I have a node type which with nodelimit user only can create 1 off...
I then wan't user to be able to make another nodetype (news) which I through views need to make a block with which
I then can show on frontpage....
So I make a view showing fields from the node:news they make, and then need to fetch fields from the other nodetype(userpage) the same user have created
So the relation would be something like node:news <-> user <-> node:userpage
Comments
Comment #1
naught101 commentedYes, that's exactly how you'd do it. The first views relationship will be
Content: Relation: YourRelation (node -> user), and the second will beUser: Content authored, and it will use the first relationship. Then you can add fields using the second relationship.The problem is that the second views relationship doesn't discriminate between node types, so you will get fields from all of the content the user has created, regardless of nodelimit. You might be better off using the core profile module for user data, if that's what you're using the userpage node type for, as it has a dedicated views relationship (I think), otherwise you might be able to use the
User: dedicated noderelationship.