How can I add a link with a UID from a User Reference from a table in Drupal Views

Posted by pduncan on Stack Overflow See other posts from Stack Overflow or by pduncan
Published on 2010-03-25T00:08:43Z Indexed on 2010/03/25 0:13 UTC
Read the original article Hit count: 592

Filed under:

I have the following in Drupal 6:

  1. A Master CCK type which contains a User reference field and other fields. There will only be one record per user here.
  2. A View of this CCK, shown as a table, with one of the fields being the user ref from the CCK type. This field is initially shown as a user name, linking to the user profile.
  3. A Second CCK type which can have several pieces of data about a particular user.
  4. A View for this CCK type, displaying information as a table. It takes a user id as an argument (an integer)

I want to click on the user name in the master view, and be directed to the detail view for this user. To do this, I tried selecting 'Output this field as a link' on the user field. The thing available for me to replace are:

Fields
    * [field_my_user_ref_uid_1] == Content: User (field_my_user_ref)

Arguments
    * %1 == User: Uid

However, the [field_my_user_ref_uid_1] element is replaced by the user name, and %1 seems to get replaced with an empty string. How can I put the user id in here?

© Stack Overflow or respective owner

Related posts about drupal-views