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

  • SEARCH
  • Home
  • 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 992989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:21:04+00:00 2026-05-16T06:21:04+00:00

I have Drupal with CCK, I have a content type named Article. This Article

  • 0

I have Drupal with CCK,
I have a content type named Article.
This Article has 5 Node references.
I’m using the table field in CCK and I’m trying to connect it to
the references, so each article [that holds a table field]
would have a table with 5 columns, one for each product
and content that can change according to what the user wants

However I’m not really sure how to do so, I tried
adding the products to the columns once they are chosen in the reference
via jquery, it seemed sluggish.. is there any former solution to this?

Image to clearify
alt text

  • 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-16T06:21:05+00:00Added an answer on May 16, 2026 at 6:21 am

    You can do this with a View, but before we get to that, it’s probably better if you make a few changes to your node.

    1. Instead of using 5 separate node reference fields for each product, add one node reference field that references products. In the configuration for the field (found on the Manage fields tab for the content type) , set Number of values to 5 under Global settings.

    2. Then, get rid of the tableview CCK field. You won’t need it as the view you’re going to create will do what you’re looking to do.

    3. Now, go to Site Building -> Views –> Add. Enter in a name for the view; let’s say listing. You can change the Description and Tags to whatever you want, but leave the View type set to Node.

    4. Now, set up the view. Under Fields, add the fields you want to show up in your product table; let’s say the Node: Title and the Node: Body.

    5. Under Filters, add a filter for Node: Type so the view will only show products and not other types of nodes.

    6. Under Basic Settings, change the Style from Unformatted to Table.

      You’ll now have a view that’ll display every product available in a table. The next stage of this is to limit that table to only display products that a particular node references. To do that, you’ll create an argument.

    7. Under Arguments, add Node: ID. The view will now display only nodes with IDs that match the argument passed to the view.

    8. Check Allow multiple terms per argument, which will let you look up more than one node at a time.

    9. Since you won’t be passing those arguments manually, you’ll have the view automatically generate the arguments its looking for. Select Provide default argument under Action to take if argument is not present.

    There are a few options available, but none match the one you want: that is, the node IDs for the nodes referenced. So, choose PHP Code so you can supply a custom argument. Use the following code:

    $arguments = array();
    $node = node_load(arg(1));
    
    if ($node->field_product) {
      foreach ($node->field_product as $product) {
        if ($product['nid']) $arguments[] = $product['nid'];
      }
    }
    
    return implode(',', $arguments);
    

    This will look for the page’s node ID (arg(1)), check to see if it has the product node reference field ($node->field_product, change field_product to the short name of your field), then build an argument containing the ID of each node referenced. It returns the argument list in the format that Views expects: 1,2,3.

    Now the view is complete: the only thing left to do is make the view appear on the page. You can create a Block display, then add that block to a region under Site building -> Blocks. If you go to a page that references products, the block will appear with the table of referenced blocks.

    If you want the view to be a part of the node itself, look into the View Reference module, which creates a CCK field that references a view much like Node Reference references a node.

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

Sidebar

Related Questions

Using Drupal 6. I've created a new node type with CCK, which has one
I have a Drupal setup like this: Content type: Apartments Vocabulary: Areas , that
I have a Drupal (v6.17) Content Type which includes a Taxonomy field. I want
I have a Drupal 6 site with a node type that has an optional,
I have a content type built by CCK in Drupal 6. If I export
I have the following in Drupal 6: A Master CCK type which contains a
Background: In Drupal 7, I have created a form with CCK (aka the Field
I have created a Drupal CCK content Event. When someone creates an event. I
I am using a popular module called Computed Field in Drupal. I have used
I have drupal 6.25. I have some content types like article, editors, slideshow and

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.