function theme_faq_hide_answer in Frequently Asked Questions 5.2
Create the structure of the FAQ page if set to show/hide the answers when the question is clicked.
Parameters
$nodes: Array of node objects to display.
Return value
A variable holding the HTML formatted page.
1 theme call to theme_faq_hide_answer()
- faq_page in ./
faq.module - Function to display the faq page.
File
- includes/
faq.hide_answer.inc, line 17 - FAQ page callbacks for the "hide answer" layouts.
Code
function theme_faq_hide_answer($nodes) {
drupal_add_js(drupal_get_path('module', 'faq') . '/faq.js', 'module');
// Fetch configuration.
$teaser = variable_get('faq_use_teaser', FALSE);
$links = variable_get('faq_show_node_links', FALSE);
$this_page = $_GET['q'];
$output = "<div>\n";
foreach ($nodes as $node) {
$output .= theme('faq_format_question', $node, $this_page, NULL, '', 'faq-dt-hide-answer');
$output .= faq_view_answer($node, array(), $teaser, $links, '', 'faq-dd-hide-answer');
}
$output .= "</div>\n";
return $output;
}