There are two users A & B. A is in "friends" type relation with B. Basically what i want to achieve with this is that i want to display blog posts made by B (or any friends of A) to A. Now the content should be displayed inside a block on user A's profile page. (Just like facebook wall where you get latest updates from friends).

I know i can achieve this using Views but can anyone point me in correct direction?

User Relationships module is what i am presently using.

  • To achieve it with Views you would need to create a vocabulary for users, so they were be able to define their relation(s), then just configure the view. I'm not familiar with the User Relationship module, but if it's the only task based on user relationships you're going to achieve, and it's possible with the module which I assume you have already installed (Views), maybe would be better to take advantage of it.
    – Jack-PL
    Commented Jul 25, 2013 at 21:47
  • Great thanks a lot. Will try experimenting a bit. For now i am using "Heartbeat" module that does what i want to achieve and is configurable with UR.
    – Bhavyanshu
    Commented Jul 26, 2013 at 15:23
  • If you want to give users the ability of creating their relations, then you are on the right track. User Relationship is a very powerful module and with the Heartbeat will surely meet your needs. This question was an occasion to learn something new for me. thanks for that. Cheers.
    – Jack-PL
    Commented Jul 26, 2013 at 21:17
  • @Jack-PL I'm glad it was useful! :)
    – Bhavyanshu
    Commented Jul 27, 2013 at 18:02

1 Answer 1

  1. Create a new View with whatever fields, teasers that you want.
  2. Click on the "Advanced" tab and that should open up a whole bunch of sections. You need the "Relationships" section. Click "Add". In the popup find "User Relationships: Requester user" that's your key.
  3. Now you need to validate who that Requester is. You do it through the Contextual Filters. Click "Add" and find "User Relationships: Requester user", and inside it's options select "Current User".
  4. Now you need to filter content that is written by "friends of" the current user. For that you need to add another relationship "User Relationships: Requestee user" which is a relationship of "User Relationships: Requester user" that you have already established.
  5. Under "Filter Criteria" click "Add" - find "node Author", and in it's options choose "requestee".

These are the basic directions, you can play around with it under different combinations.

Your Answer

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

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