You are here

function theme_faq_format_answer in Frequently Asked Questions 5.2

Theme function to format an answer.

Parameters

$node: The node object.

$answer_label: Answer label, if set.

$class: An additional class name to assign the div containing the answer.

Return value

HTML formatted string containing the answer.

1 theme call to theme_faq_format_answer()
faq_view_answer in ./faq.module
Helper function to setup the faq answer.

File

./faq.module, line 1588
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_format_answer($node, $answer_label = '', $class = NULL) {

  // Setup the HTML formatted answer.
  $answer = '<div class="faq-answer">';
  if ($class) {
    $answer = '<div class="faq-answer ' . $class . '">';
  }
  $answer .= '<strong>' . $answer_label . '</strong>' . $node->body;
  if ($node->links) {
    $answer .= '<div class="links">' . theme('links', $node->links) . '</div>';
  }
  $answer .= "</div>\n";
  return $answer;
}