page.pre.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * @file template.preprocess-page.inc
  4. */
  5. /**
  6. * Override or insert variables into page templates.
  7. *
  8. * @param $vars
  9. * A sequential array of variables to pass to the theme template.
  10. * @param $hook
  11. * The name of the theme function being called.
  12. */
  13. # set variables for the logo and slogan (from Deco drupal 6.x theme)
  14. $site_fields = array();
  15. if ($vars['site_name']) {
  16. $site_fields[] = check_plain($vars['site_name']);
  17. }
  18. // if ($vars['site_slogan']) {
  19. // $site_fields[] = check_plain($vars['site_slogan']);
  20. // }
  21. $vars['site_title'] = '<h1><a href="/">'. implode(' ', $site_fields) .'</a></h1>';
  22. if (theme_get_setting('layout_enable_settings') == 'on')
  23. $vars['method'] = theme_get_setting('layout_method');
  24. $vars['primary_local_tasks'] = menu_primary_local_tasks();
  25. $vars['secondary_local_tasks'] = menu_secondary_local_tasks();
  26. global $language;
  27. drupal_add_js(array('perfarttimeline' => array(
  28. 'strings'=>array(
  29. 'search'=>t('search'),
  30. 'filter'=>t('filter'),
  31. 'site_name'=>t(variable_get('site_name', '')),
  32. 'site_slogan'=>t(variable_get('site_slogan', '')),
  33. 'advanced_nav'=>t("Advanced navigation"),
  34. 'classical_nav'=>t("Classical navigation"),
  35. 'loading_timeline' => t('Timeline is loading, it will start in a few seconds.'),
  36. ),
  37. 'theme_path'=> drupal_get_path('theme', 'perfarttimeline'),
  38. 'language'=>$language->language,
  39. )), 'setting');