0

I'm trying to create a View Block to display related information on a node.

I'm creating an image gallery where each image node is tagged with one/more taxonomy terms, and a block on each of those nodes then displays a list of users who have expressed an interest in the same taxonomy term(s).

So the node is tagged with e.g "landscape" and a user has a Profile2 profile in which they have have also selected "landscape" with a taxonomy ref field.

I'm having trouble building the view to achieve this. If I create a new view with a block and select that i'm displaying "Profiles" from the initial dropdown, views seems to remove some of the kinds of objects I can choose in the Contextual Filters or Relationships menus: Node isn't available for linking in a relationship.

If I go about in the "other direction" and make a view of Nodes, then try and create relationships backwards to the Profiles I want, I'm unable to select fields present in the Profile for output - the only fields available are those on the Node.

It seems that by choosing a specific kind of object to list, Views immediately excludes certain possibilities for joining.

Is this not possible? I know what the exact SQL would be, but I'd rather not write a module if a View would do.

1 Answer 1

0

Should the relationship not go via the taxonomy reference rather than direct profile to node? Or have I misunderstood what you've tried/want to achieve?

2
  • Doh, school-boy error. For some reason I was trying to go directly via the profile direct to the node! Eventual query basically was: Build a view of profiles, relationship on profile "preferred tags", another relationship on taxonomy, then, another on "content using tag X" then a contextual filter on the current node ID from the URL. Cheers for the help, bud!
    – xcession
    Apr 5, 2013 at 18:27
  • Welcome! It can certainly be easy at times to lose sight of things behind the UI :-) Glad to help
    – Bryan
    Apr 5, 2013 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.