You are here

function theme_faq_page in Frequently Asked Questions 7.2

Same name and namespace in other branches
  1. 6 faq.module \theme_faq_page()
  2. 7 faq.module \theme_faq_page()

Theme function for faq page wrapper divs.

1 theme call to theme_faq_page()
new_faq_page in ./faq.module
Function to display the faq page.

File

./faq.module, line 1597
The FAQ module allows users to create a FAQ page, with questions and answers displayed in different styles, according to the settings.

Code

function theme_faq_page($variables) {
  $content = $variables['content'];
  $answers = $variables['answers'];
  $description = $variables['description'];
  $output = '<div class="faq-content"><div class="faq">';
  if (!empty($description)) {
    $output .= '<div class="faq-description">' . $description . "</div>\n";
  }
  if (variable_get('faq_show_expand_all', FALSE)) {
    $output .= '<div id="faq-expand-all">';
    $output .= '<a class="faq-expand-all-link" href="#faq-expand-all-link">[' . t('expand all') . ']</a>';
    $output .= '<a class="faq-collapse-all-link" href="#faq-collapse-all-link">[' . t('collapse all') . ']</a>';
    $output .= "</div>\n";
  }
  $output .= $content;
  $output .= $answers . "</div></div>\n";
  return $output;
}