0

In Drupal-6 I have a content type called: Colors with the following fields: title, body and code. Then I have another content type called: Material with the following fields: title, body and color. This color field is a node reference related to the Colors content type.

So far so good.

Now when I create a Material node I can select a color from a select list. And here is my issue: this select list shows the title of the colors nodes. Is there any way to show the code for the node instead of the title. Or better, show the title and the code.

1

You can use a view to show the nodes that can be referenced, have a look at the settings of the widget, it's been a while since I used D6, but if you select title and code inside your view it should be visible when you edit a Material node.

  • I don´t understand I have a content type with a field to reference to another content type. How do I implement views here?? – chefnelone Oct 10 '11 at 8:45
  • you create a new view (drupal.org/project/views) that lists your colors. In the settings of your node reference field instead of selecting the content type(s) that can be referenced, you select this view – Attiks Oct 10 '11 at 8:52

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.