Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 701389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:36:16+00:00 2026-05-14T03:36:16+00:00

I have the following in Drupal 6: A Master CCK type which contains a

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:36:16+00:00Added an answer on May 14, 2026 at 3:36 am

    Well, I’m not sure what the right way to do this is, but I’m solving it the hacky way I seem to be solving all my Views problems: by throwing jquery at it.

    Currently, the User Ref field already has a link with the user id, so I’ve added this to the footer:

    <script type="text/javascript">
        $(function() {
            var $rows = $("table.views-table tbody tr");  
            $rows.children("td:nth-child(1)").each(function() {
                var $anchor = $(this).children("a");
                var linkElements = $anchor.attr("href").split("/");
                var userId = linkElements[linkElements.length - 1];
                $anchor.attr("href","/my_detail_view/" + userId);
            });
        });
    </script>
    

    I hate that I have to do it like this, but I sure do love jquery.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following problem in Drupal 6 with CCK: user1 creates node 1
Im using Drupal 6.x. In my page i have the following code which prints
I want to accomplish the following scenario in Drupal: You have 2 content-types. Lets
I have following situation: I have loged user, standard authentication with DB table $authAdapter
I have following string String str = replace :) :) with some other string;
I have following situation. A main table and many other tables linked together with
I have following Code Block Which I tried to optimize in the Optimized section
Backround: Suppose I have the following Git URLs (hosted on github) http://github.com/mikl/drupal.git git://github.com/mikl/drupal.git (Git
We have a content type with two imagefield / filefield fields, and after migrating
I have the following module, which affects how users arrive at two different content

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.