1

I want to create a "question" content type, but is it possible to make the answer a separate node?

Because I want to use Views with user relationships module to show answers to friends or followers.

2
  • Sure just use the Relation module or the Node References module to link answer to question.
    – Deryck
    Commented Jan 31, 2014 at 0:43
  • Did you have a look at Comparison of Question and Answer modules? In order to get faster and more reliable answers it is good to tell what you have already researched and where the approaches that you have found, fall short of what you want.
    – berliner
    Commented Jan 31, 2014 at 1:51

1 Answer 1

0

If you don't want to reinvent the wheel, you should have a look at the Answers module. Here are some details about it (from its project page):

Answers enables the implementation of a Question & Answer system in a Drupal site. Users can post questions and other users can answer them.

Head over to its project page for more details.

At its core, this module exists of 2 typical content types:

  • Question.
  • Answers.

The "Best Answer" submodule can be used so that the question author can "accept" one of the answers as the best one. And you could make the Rules module to either trigger all sorts of subsequent things to happen "when an answer gets marked as best answer", or to add all sorts of validations when posting an answer (or question).

The Answers module comes with integrations with other modules such as the Rules module and the Userpoints module and supports voting.

Demo

Have a look at the (new) demo site of the Answers module. This link shows various menu options within the block with title Answers Menu, i.e.:

  • Questions (= a view):
    • All: of all existing questions (= default tab).
    • Answered: all questions which have a "best" (= accepted) answer (= sub-tab).
    • Unanswered: all questions which do not yet have a "best" (= accepted) answer (= sub-tab).
  • Answers (= a view): lists all existing answers for any of the existing questions and which does not (yet) have any submenu options (implemented as tabs).
  • Rankings (= a view): contains a list of users with their actual ranking (= reputation points implemented via user points), and with each user a link to either the questions or answers from that user.
  • Ask Question: to post a new question (the equivalent of node/add/question), which is only shown for authenticated users though.

Disclosure: I'm a (co-)maintainer of this module.

Your Answer

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

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