You are here

function faq_preprocess_page in Frequently Asked Questions 7

Same name and namespace in other branches
  1. 8 faq.module \faq_preprocess_page()
  2. 6 faq.module \faq_preprocess_page()
  3. 7.2 faq.module \faq_preprocess_page()

Implements template_preprocess_page().

Override the breadcrumbs for faq nodes.

File

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

Code

function faq_preprocess_page(&$variables) {
  if (!empty($variables['node']) && isset($variables['node']->type) && $variables['node']->type == 'faq' && module_exists('taxonomy')) {
    if (!empty($variables['node']->taxonomy)) {
      foreach ($variables['node']->taxonomy as $term) {
        continue;
      }
    }
    else {
      $term = NULL;
    }
    $variables['breadcrumb'] = theme('breadcrumb', array(
      'breadcrumb' => faq_set_breadcrumb($term),
    ));
  }
}