1

I created a view which displays users on my site. In the view, the "name" of users links to their individual profile.

Now i want to have more control over information displayed to users when they view other peoples profile.

To achieve this, I am of the opinion that i need to create another view to display the user profile. Where i see a challenge ahead is how to make my first view link to the individual user profile based on my new view.

Please, how do i achieve these or is there a better way?

Thanks in anticipation.

  • Means you have 2 views, one for USERS listing and when ever the user click the one of the user you want to show user details using another view right? – inizio Jul 30 '13 at 13:20
4

Hope this will help you,

As I understand you have 2 views, first view is to list the users and the second view is to show the particular user detail information.

In Drupal 7 you can achieve it easily.

Let say the first view path will be users/listing and the second view path is user/%/other.

Steps

  • In first view where you are listing all the users, add another field UID and pull it to the top and exclude it.

    enter image description here

  • And go to USER NAME field and uncheck Link this field to its user and goto Rewrite results and check Output this field as a link and enter user/[uid]/other and save it. [uid] is taken form the Replacement patterns

    enter image description here

  • Now its time to create new view which will be showing the user information based on the user id. In this view we need to add the contextual filter, based on that the user detail will be shown.

    enter image description here

  • Add contextual filter

    enter image description here

  • Thanks for the extensive and elaborate explanation. Works fine. – seyi Jul 30 '13 at 15:24
  • Please can this be adapted if the initial view is in a block? (as it does not have a path) Thanks! – seyi Jul 30 '13 at 17:56
  • Of Course You Can do it. The links of the users will remain same for the initial view. – inizio Jul 30 '13 at 18:16
0

It is possible if you relate the user to a form he or she submitted, using the data module, schema module, and mysql views module. Assuming you are using a mysql backend. This video shows you how: http://vimeo.com/18701843

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.