You are here

function theme_faq_answer_category_header in Frequently Asked Questions 5.2

Theme function to format the sub-category header to display with the answers.

Parameters

$term: The child term which a header should be generated for.

$term_image: HTML output containing any taxonomy images attached to the taxonomy term.

Return value

HTML formatted string containing the category header for answer sections in the "questions top" layout.

2 theme calls to theme_faq_answer_category_header()
theme_faq_category_questions_top in includes/faq.questions_top.inc
Create the layout of the FAQ page if set to show the questions on top, all sorted by categories.
theme_faq_category_questions_top_answers in includes/faq.questions_top.inc
Create the layout of the answers if set to show the questions on top, all sorted by categories.

File

./faq.module, line 1853
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_answer_category_header($term, $term_image) {
  $hdr = "h5";
  if ($term->depth > 0) {
    $hdr = "h6";
  }
  $answer_header = $term_image;
  $answer_header .= "<{$hdr} class=\"faq-header\">";
  $answer_header .= check_plain($term->name);
  $answer_header .= '</' . $hdr . ">\n";

  // #298153 - separated for Dreamweaver.
  return $answer_header;
}