You are here

function template_preprocess_faq_new_page in Frequently Asked Questions 6

Same name and namespace in other branches
  1. 8 includes/faq.new_page.inc \template_preprocess_faq_new_page()
  2. 7.2 includes/faq.new_page.inc \template_preprocess_faq_new_page()
  3. 7 includes/faq.new_page.inc \template_preprocess_faq_new_page()

Create FAQ page if set to show the answer in a new page.

Parameters

&$variables: Array reference of arguments given to the theme() function.

File

includes/faq.new_page.inc, line 14
FAQ page callbacks for the "new page" layouts.

Code

function template_preprocess_faq_new_page(&$variables) {
  $items = array();
  $data = $variables['data'];
  foreach ($data as $node) {
    $items[] = l($node->title, "node/{$node->nid}");
  }
  $list_style = variable_get('faq_question_listing', 'ul');
  $variables['list_style'] = $list_style;
  $variables['list_items'] = $items;
  $variables['list'] = theme('item_list', $items, NULL, $list_style, array(
    "class" => "faq-question-listing",
  ));
}