0

I'm building a Drupal 7 book listing website. I have created a content type called book listing and it has fields for book details and author details.

I want to be able to treat the author and book details as separate entity, in the sense that I want to have a views for author (and a special page for individual author) and book listing page with author name that links back to the author page. I have battled with this for over 3 weeks with no solution. I was thinking if there is a way I can load an author content type form on the book listing form.

I need help please. I found a question Content type within content type? which is similar to my case, but no detailed answer.

Thanks.

  • or better still can someone please tell me how to and what module to use to create a href link in my book details content type to load my author details content type in jquery popup and when a user fill the author details and click save it save and return to the book details form, please am seriously behind schedule and would really appreciate your help – wisdomgreat Dec 27 '12 at 22:10
0
  1. you have content type called : book listing.
  2. Add field user reference if you want to treat author as user or node reference if you have author as content type.
  3. Now on Book detail page give the link for author.
  4. On author page if the author is user. call a view and display all the books along with other author information same you can do with node as well.

(There are many other way to do it but this one seems clean if you can separate author from book)

  • j2r thanks for your response, but let me make the question a bit clearer, i have a two content types here Book Author and Book Details, if an author intends to list his work on our site he has to fill Book Author Details and Book Detail on a single page and submit, when submitted the content of both content type should be treated separately, the form i have created is at naijabooker.com/premium-book, check it and see if you understand what am saying. thanks – wisdomgreat Dec 27 '12 at 7:11
  • the form naijabooker.com/premium-book is how i intent the final form of the content type to be – wisdomgreat Dec 27 '12 at 7:13
  • its giving site under maintenance. – j2r Dec 27 '12 at 8:21
  • sorry it is open now – wisdomgreat Dec 27 '12 at 11:33
0

As you indicate in your question, you can use the Views module to pick individual fields from the database and create a "view" with those fields only. So you while you have a single entry form for both Author detail and Book detail you can use Views to separate the fields so that you can show Author detail without showing Book detail, and vice versa.

Views also let you create lists. With Views, you can, for instance, list authors and let each author name link to the full author description.

The learning curve for Views may be a bit steep, but once you master it, it is a very powerful tool to pull stuff from the database and customize the ways your site displays it.

  • i have done that with views but am having two issues the first is, am having repetition of data, if the same author post different books, his details is repeated you can see what i mean through this link naijabooker.com/authors. the second issue is this i want to be able to make author name in the book listing a link to author author information, also the link to what am saying is naijabooker.com/titles. thanks for your anticipated help – wisdomgreat Dec 27 '12 at 8:06
0

Apparently, I can't comment yet (or don't know how to do it...). But perhaps the problem of authors appearing more then once can be fixed by going to the

views module --> query settings --> Check: "distinct" and "pure distinct"

Have you tried doing this?

  • yes i have did not work – wisdomgreat Dec 27 '12 at 19:10

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.