function bellcom_preprocess_page(&$variables) { $current_theme = variable_get('theme_default', 'none'); $primary_navigation_name = variable_get('menu_main_links_source', 'main-menu'); $secondary_navigation_name = variable_get('menu_secondary_links_source', 'user-menu'); // Navigation $variables['primary_navigation'] = _bellcom_generate_menu($primary_navigation_name, 'main-navigation'); $variables['secondary_navigation'] = _bellcom_generate_menu($secondary_navigation_name, 'main-navigation'); $variables['sidebar_primary_navigation'] = _bellcom_generate_menu($primary_navigation_name, 'sidebar'); $variables['sidebar_secondary_navigation'] = _bellcom_generate_menu($secondary_navigation_name, 'sidebar'); // Paths $variables['path_js'] = base_path() . drupal_get_path('theme', $current_theme) . '/dist/js'; $variables['path_img'] = base_path() . drupal_get_path('theme', $current_theme) . '/dist/img'; $variables['path_css'] = base_path() . drupal_get_path('theme', $current_theme) . '/dist/css'; $variables['path_font'] = base_path() . drupal_get_path('theme', $current_theme) . '/dist/font'; // Theme settings $variables['theme_settings'] = _bellcom_collect_theme_settings(); }
function bellcom_preprocess_page(&$variables) { $current_theme = variable_get('theme_default', 'none'); $primary_navigation_name = variable_get('menu_main_links_source', 'main-menu'); $secondary_navigation_name = variable_get('menu_secondary_links_source', 'user-menu'); // Navigation $variables['primary_navigation'] = _bellcom_generate_menu($primary_navigation_name, 'main-navigation', 1); $variables['secondary_navigation'] = _bellcom_generate_menu($secondary_navigation_name, 'main-navigation'); $variables['sidebar_primary_navigation'] = _bellcom_generate_menu($primary_navigation_name, 'sidebar'); $variables['sidebar_secondary_navigation'] = _bellcom_generate_menu($secondary_navigation_name, 'sidebar'); // Paths $variables['path_js'] = base_path() . drupal_get_path('theme', $current_theme) . '/dist/js'; $variables['path_img'] = base_path() . drupal_get_path('theme', $current_theme) . '/dist/img'; $variables['path_css'] = base_path() . drupal_get_path('theme', $current_theme) . '/dist/css'; $variables['path_font'] = base_path() . drupal_get_path('theme', $current_theme) . '/dist/font'; // Theme settings $variables['theme_settings'] = _bellcom_collect_theme_settings(); if (!empty($settings['options']['footer_logo']['footer_logo_path'])) { $vars['options']['footer_logo']['footer_logo_path'] = $settings['options']['footer_logo']['footer_logo_path']; } else { $variables['options']['footer_logo']['footer_logo_path'] = path_to_theme() . '/small-logo.png'; } }