You are here

function template_preprocess_faq_new_page in Frequently Asked Questions 7

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

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

Parameters

array &$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', array(
    'items' => $items,
    'title' => NULL,
    'type' => $list_style,
    'attributes' => array(
      "class" => "faq-question-listing",
    ),
  ));
}