Description

The Frequently Asked Questions (faq) module allows users with the 'administer faq' permission to create question and answer pairs which they want displayed on the 'faq' page. The 'faq' page is automatically generated from the FAQ nodes configured and the layout of this page can be modified on the settings page. Users will need the 'view faq' permission to view the 'faq page' page.

There are 3 blocks included in this module, one shows a list of FAQ categories while the others can show a configurable number of recent or random FAQs added.

Note the function theme_faq_highlights(), which shows the last X recently created FAQs, used by one of the blocks, can also be called in a php-filtered node if desired.

Configuration

Once the module is activated, you can create your question and answer pairs by creating FAQ nodes (Create content >> FAQ). This allows you to edit the question and answer text. In addition, if the 'Taxonomy' module is enabled and there are some terms configured for the FAQ node type, it will also be possible to put the questions into different categories when editing.

The ability to configure the layout of the FAQ page is only possible in the Drupal 5.x and later versions of the module. There are four question and answer layouts to choose from. The 'administer faq' permission is needed for configuring the 'faq' page layout and editing of FAQ nodes.

You can also view the FAQ Module Preview article which offers a step by step configuration guide with screenshots and an inside look at the module

Including FAQ content in other nodes

In 5.x and 6.x versions, it is also possible to include the 'faq' page content in other nodes, for example, at the end of an article. To include the full 'faq' page content, just add the following PHP code to your node body. It works for both categorized and uncategorized faq nodes.

<?php
$faq_output = faq_page();
print $faq_output;
?>

In addition, if you just want to include faq nodes from within just one category (e.g. term id = 123), you can do:

<?php
$faq_output = faq_page(123);
print $faq_output;
?>

If displaying FAQs for a particular category, then the category name will not be displayed. this is by design and is often the desired behaviour if embedding the FAQ content in another page. If you wish to display the category name, you can do the following (add HTML tags as desired):

<?php
$tid = 123;
$term = taxonomy_get_term($tid);
print $term->name;
print faq_page($tid);
?>

6.x and 7.x specific features

In Drupal 6 and 7, if you wish to choose a different question layout than the default one configured, you can do:

<?php
print faq_page(NULL, 'questions_top');
?>

or

<?php
print faq_page(123, 'questions_inline', 'categories_inline');
?>

So the first param is the term id (if categories are in use), the second param is the question layout and the final one is the category layout.

The list of possible question layouts is:

  • questions_inline : Questions inline
  • questions_top : Clicking on question takes user to answer further down the page
  • hide_answer : Clicking on question opens/hides answer under question
  • new_page : Clicking on question opens the answer in a new page

The list of possible category layouts is:

  • none : Don't display
  • categories_inline : Categories inline
  • hide_qa : Clicking on category opens/hides questions and answers under category
  • new_page : Clicking on category opens the questions/answers in a new page

In each instance, you will need to choose the "PHP code" input filter format.

Uninstalling FAQ Module

Current maintainer

Stella Power (http://drupal.org/user/66894)

Comments

eviennot’s picture

Hello all,

To anyone that might face the same problem : for a 7.8 drupal install, the path to use to link to the faq page is not "faq" but "faq-page". It took me a while to figure it out and it seems to be not very obvious in the docs.

Cheers,

fmannhardt’s picture

I've some time on this and figured it out by reading the README.txt of the module itself.
Anywhere else "faq" is used in the documentation. :(

flightrisk’s picture

Yes, this should have been clear, especially for people who are upgrading. This broke my pages and menus. I had to search and find the clue in the readme and then create new menu items. Why would they change it from "faq" to "faq-page" anyway? Now I have to create an alias because this page is hard-coded.

shaneholmes’s picture

I have everything installed and configured - nothing shows

See my screenshots

Only local images are allowed.
Only local images are allowed.
Only local images are allowed.
Only local images are allowed.

hariskar’s picture

FAQ works as it should in Firefox, but not in Chrome. All questions are expanded and I can not change this. Any solution? Thank you!