FAQ: Frequently Asked Questions
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.
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 specific features
In Drupal 6, 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:
- 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.
Current maintainer
Stella Power (http://drupal.org/user/66894)

How to completely remove the FAQ module
How does one completely remove/uninstall the FAQ module (including any database tables it may have created)?
Disable the module, and then
Disable the module, and then uninstall it at admin/build/modules/uninstall Please post all further support questions in the issue queue and not on the documentation page.
quick function for traversing a specific faq vocabulary id
I needed a function for displaying all terms in a given vocabulary with populated FAQs. faq_page($tid) is specific to a single term, so it wasn't quite what I wanted, but close.
Hope the following helps someone. If I've missed some built-in functionality, please indicate.
Into template.php (Drupal 5):
<?php
function build_faqs_from_vocab($vocab_id) {
// get single generation of children from vocabulary
$tree = taxonomy_get_tree($vocab_id);
$output = '';
foreach ($tree as $faq_set) {
$faq_set_title = $faq_set->name;
$faq_set_tid = $faq_set->tid;
$faq_set_body = faq_page($faq_set_tid);
if ($faq_set_body != '<div class="content"><div class="faq"></div></div>') { // not empty
$output .= '
<h2>'.$faq_set_title.'</h2>
'.$faq_set_body;
}
}
return $output;
}
?>
FAQ Menu Item
Hello, this may be a newBie question here, but i noticed that when adding the FAQ to a menu it is displaying as a 'collapsed' menu item, which when clicked by a user does not expand and only opens the FAQ page which is fine as i do NOT want the menu to expand, however, i would love to have the menu item just appear without the 'collapsed' style class.
Any idea how to change this?
Thanks
nothing in All FAQs
How come I have built 2 FAQ, but there is no any FAQ nodes in the "All FAQs" tag but those 2 show on "Recent FAQs"?
and I have enabled Taxonomy
and I have enabled Taxonomy moudle.