0

What is my current site setup:

I am working on an academic website using Drupal 7 and I'm working on adding content from one content type into another content type.

I have a Books content type and also a People content type.

Book has the following fields:

  • Image (image upload field)
  • Title (textfield)
  • Description (rich text)
  • Publisher URL (text field)
  • Publish Year (text field)
  • People name (entity reference to the title on the People content type (multi select))

People has the following fields:

  • Title (the person's full name) (textfield)
  • Description (rich text)
  • Email (text field)
  • Phone number (text field)
  • Office location (text field)
  • Biography (rich text)
  • Research (rich text)

My specific question: How do I relate the book content type to the people content type so that the list of books written by the respective person appear on the public version of the person's people content type page?

2
  • please tag your question 7 or 8, look for entity-reference module
    – pinueve
    Jul 31, 2017 at 4:48
  • You want to display Books content on specific Person's display page in front website? Like list of books written by particular person. Right?
    – Arpi Patel
    Aug 4, 2017 at 9:53

1 Answer 1

1

You can achieve this using reference module

Install this module, enable the references and node reference checkbox in the Module menu.

Create the people and book content type with the respective field

In Book content type, Add the People name field, and choose the node reference , then it will the show all the content types.

Select the People content type, set the widget types as select list.

Then create a content in Book, People Name field will show the people title as options in select list..

DO this thing, Please ask me if you have any queries.

Before that: Create some contents in People content type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.