1

I am looking for a way to list nodes in a different node. Not sure how to explain this, so I will do it with an example.

Let's say I'm for example making a website for a Tennis tournament, this is not the real purpose, so if you have a different solution for this, it's probably not what I need, I want to achieve what I'll say in this example:

I have the following nodes:

  • Player
  • Match

In player I have:

  • Player name
  • Player age
  • Player ranking
  • etc...

In the node match, I have a few settings, including:

  • Player 1
  • Player 2

What I want to achieve is that in the node "match" I can choose 2 players from the node "player". In the list it shows the player name, however, I should be able to get the extra information as well when rendering the match node.

Any ideas if a certain module excists that could help me out?

Thank you very much!


Edit 22/07/2014:

As an addition, I would also like a different list to inherit his items depending on a previous selected item.

So for example I have 3 nodes:

  • Car
  • Brand
  • Model

The first thing that I would do is: I make different brands as "Brand" nodes content:

  • BMW
  • Mercedes
  • Volvo
  • ...

Afterwards I make a Model. In model I make the models - 'Z4' => And in the list I choose "Brand: BMW" - 'S60' => And in the list I choose "Brand: Volvo" - 'V70' => And in the list I choose "Brand: Volvo" - ...

Now I want my third node "car" to be for example for a seller of cars. So the seller sells a car. He makes a car node and enters the following information:

  • Buyer: Person A
  • Address: Address X
  • Age: 99
  • Licenseplate: 1 XXX 999
  • Brand: ....
  • Model: ....

So what I'm trying to achieve is that the seller has a list of all brands. If he chooses brand "Volvo" for example, then the Model list should appear and show all models for the chosen brand.

0

I think what you're wanting can be accomplished with views. You may need to add some fields to make the context work for your needs.

7
  • Please elaborate on your answer and provide details. Aug 13 '14 at 22:14
  • I don't think a view is what I need. It's not the result that is viewable that I want to change, what I need is a list when creating the node So, with the example of the cars: 1.I make brands of cars. 2. I make models where I pick a brand from a selection list (based on the brands made in brand node) 3. I make a new car & choose a brand from a selection list, then when I pick that brand, the selection list for models should be filled up. I doubt that this would be possible with views, as it's the backend I want to have like this, not the forend. And I expect I need ajax to fill second list. Aug 13 '14 at 22:27
  • If I'm correct, then your idea was to make the nodes by typing in the model name in the input field twice, and then having a view that combines the 2. That's not a problem, I already have a complete setup which shows the result correctly to the site visitors. What I want however, is that content providers do not have to type it, but choose it from a list, therefor they can't misstype it. That I can do by making the field a list, and adding possible input's in the list, however, I want to make this list dynamic, by making it load the names of another nodetype. Aug 13 '14 at 22:32
  • Maybe Taxonomy with hierarchy is more in line with what you're looking for. drupal.org/project/hierarchical_select Aug 13 '14 at 22:34
  • I already use that, however that isn't what I'm looking for. It's really something with AJAX that I need, but I suppose there's no module available yet, so I'll have to check to make it myself I'm afraid. Taxonomy would be great, if I only needed 1 level. But I need multiple levels, where 1 list box inherits it's data depending on the earlier chosen data from another list. Imagine a database with all tennis players in the world, that would be a way too long list. would be better if you first choose the country, then get only players from that country to choose from. Aug 13 '14 at 23:20

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.