1

I've been boggling my brain on this for a while now and although I seem to be getting close, so far there is now awesomness kicking in.

Here's what I want:

I have a number of articles (nodes), each with their own list of taxonomy terms I have a number of users, each with a list of interests defined in taxonomy terms I want to generate a list of users subscribed to taxonomy terms of the -current- node

I've tried many different approaches and often had the feeling I got close but, so far, no dice.

The closest I've gotten so far is: view of 'user' relationship: 'User: content authored' (yes,I know, this limits the output to author only but it DOES expose the "(nodes)Content: taxonomy terms on node" relationship, which exposes '(term) Taxonomy term: name of the tax-list' etc..

SO: If someone could point out the general outline of the approach (what view type, what relationships to use) that would get me where I need to be, that would be splendid!

REWARD: A whole lotta love will go to the one who sets me on the right track!

  • Are the taxonomy terms that the user fancies the same as the taxonomy terms for the articles? – Bernard Nandwa Jul 13 '13 at 15:49
1

You can set the same vocabulary for users and your content type, so they will be related with the same terms, then you will be able to achieve your goal with these four steps:

#1

Create a View block with these settings:

View->name: Related users Show -> taxonomy terms -> of type -> your vocabulary

#2

Create relationship: Taxonomy term: User using [field_name]

* field_name: the name of the field with term reference in users account settings

check: Require this relationship

#3

Add field: (field_name) User: Name

* field_name: the name of the field with term reference in users account settings

#4

Add contextual filter: Taxonomy term: Term ID

Configure the contextual settings:

WHEN THE FILTER VALUE IS NOT AVAILABLE:

provide default value: taxonomy term id from URL

check: Load default filter from term page

check: Load default filter from node page, that's good for related taxonomy blocks

Select your vocabulary

Check: Filter to items that share any term

WHEN THE FILTER VALUE IS AVAILABLE OR A DEFAULT IS PROVIDED:

Specify validation criteria -> basic validation

Action to take if filter value does not validate -> hide view

MORE:

check: Allow multiple values


That's all. If the current node will have a relation with some user or users, then the block with the related users will be displayed.

|improve this answer|||||
  • It's been a while since I posted this question and I've since allowed myself to forget the problem (I seem to remember I wrote a flimsy module to get the result I wanted). But when reviewing my account I saw your awesome reply that, no doubt, would have been the answer I was looking for. So, though late, here's the whole lotta love I promised! Many thanks for taking the time! Cheers! – Ean Bool Dec 10 '13 at 5:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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