/** * @file template.php * This file provides theme functions to override or extend Drupal behavior. * * @author Raymond Jelierse */ function equinox_preprocess_page(&$variables) { // Default JavaScript settings $theme_settings = array( 'carouselTimeout' => 10000, 'carouselTransitionSpeed' => 500, ); // Refresh theme settings theme_get_setting('', TRUE); if (theme_get_setting('carousel_timeout') !== NULL) { $theme_settings['carouselTimeout'] = intval(theme_get_setting('carousel_timeout')); } if (theme_get_setting('carousel_transition_speed') !== NULL) { $theme_settings['carouselTransitionSpeed'] = intval(theme_get_setting('carousel_transition_speed')); } drupal_add_js(array('equinox' => $theme_settings), 'setting'); $variables['scripts'] = drupal_get_js(); // Create user menu $variables['user_menu'] = theme('links', menu_navigation_links('navigation'), array('id' => 'user-links-menu', 'class' => 'links user-links')); // Add check variable for administration section. $variables['is_admin'] = (arg(0) == 'admin'); // Remove breadcrumb if not in the administration section. if (!$variables['is_admin']) { $variables['breadcrumb'] = ''; } // Multilanguage site logo $variables['logo'] = sprintf('%s/images/logo-%s.png', url(drupal_get_path('theme', 'equinox')), $variables['language']->language); }
function hubclip_preprocess_page(&$vars) { $left_menu = menu_navigation_links('main-menu'); $right_menu = menu_navigation_links('user-menu'); $vars['topbar_left'] = theme('links', array('links' => $left_menu)); $vars['topbar_right'] = theme('links', array('links' => $right_menu, 'attributes' => array('class' => array('right')))); }
function rootcandy_preprocess_page(&$vars) { $vars['tabs2'] = array( '#theme' => 'menu_local_tasks', '#secondary' => $vars['tabs']['#secondary'], ); unset($vars['tabs']['#secondary']); //set the links level in settings $rootcandy_navigation = menu_navigation_links('management', 1); $vars['rootcandy_navigation'] = theme('links__rc_main_navigation', array('links' => $rootcandy_navigation)); $rootcandy_navigation_class = array(); if (!theme_get_setting('rootcandy_header_display')) { $rootcandy_navigation_class[] = 'i' . theme_get_setting('rootcandy_navigation_icons_size'); } if (!theme_get_setting('rootcandy_header_display')) { $rootcandy_navigation_class[] = 'header-on'; } $vars['rootcandy_navigation_class'] = ''; if ($rootcandy_navigation_class) { $vars['rootcandy_navigation_class'] .= ' '. implode(' ', $rootcandy_navigation_class); } // get admin links into the region $rootcandy_nav['menu'] = 'management'; $rootcandy_nav['level'] = 2; $menu = menu_navigation_links($rootcandy_nav['menu'], $rootcandy_nav['level']); $menu_links = theme('links', array('links' => $menu, 'attributes' => array('id' => 'content-menu'))); if ($vars['language']->direction) { $vars['page']['sidebar_second']['nav']['#markup'] = $menu_links; } else { $vars['page']['sidebar_first']['nav']['#markup'] = $menu_links; $vars['page']['sidebar_first']['nav']['#weight'] = -100; $vars['page']['sidebar_first']['#sorted'] = FALSE; } }
/** * Implements hook_preprocess_page(). */ function vdb_preprocess_page(&$vars) { $menu1 = menu_navigation_links('main-menu', 0); $vars['menu_first'] = theme('links__system_main_menu', array('links' => $menu1, 'attributes' => array('id' => 'main-menu-links'))); $menu2 = menu_navigation_links('main-menu', 1); $vars['menu_second'] = empty($menu2) ? '' : theme('links__system_main_menu', array('links' => $menu2, 'preserve_query' => TRUE, 'attributes' => array('class' => array('tabs', 'primary')))); $vars['tabs_first'] = menu_primary_local_tasks(); $vars['tabs_second'] = menu_secondary_local_tasks(); }
/** * Intercept page template variables * * @param $vars * A sequential array of variables passed to the theme function. */ function vozmob_white_label_preprocess_page(&$vars) { global $user; $headers = drupal_set_header(); if (strpos($headers, 'HTTP/1.1 403 Forbidden') && !$user->uid) { $vars['content'] .= "\n" . l(t('Please login to continue'), 'user/login', array('query' => drupal_get_destination())); } // Add drupal menu for footer links $footer_links_source = menu_navigation_links(variable_get('menu_footer_links_source', 'menu-footer-links')); $vars['footer_links'] = theme('links', $footer_links_source, array('class' => 'footer-links')); }
/** * Implementation of hook_preprocess_page * * @param unknown_type $variables */ function alternator_preprocess_page(&$variables) { if (in_array('page-user-login', $variables['template_files'])) { $variables['content'] = '<h1>' . t('Login') . '</h1>' . $variables['content']; } if (in_array('page-user-status', $variables['template_files'])) { $variables['content'] = '<h1>' . t('Min konto') . '</h1>' . $variables['content']; } //var_dump($variables); $variables['mobilemainmenu'] = menu_navigation_links('menu-mobile-menu'); $mobilebottommenu = menu_navigation_links('menu-bottom-menu'); $mobilebottommenu['mainsite'] = array('href' => variable_get('mobile_tools_desktop_url', '') . '?nomobile=true', 'title' => t('Gå til koldingbibliotekerners hjemmeside')); if (!drupal_is_front_page()) { $mobilebottommenu = array_merge(array('frontpage' => array('href' => '<front>', 'title' => t('Forsiden'))), $mobilebottommenu); } $variables['mobilebottommenu'] = $mobilebottommenu; }
/** * * * @param * * @return */ function sca_responsive_get_main_menu($footer = FALSE) { $menu = menu_navigation_links('main-menu'); if ($footer) { unset($menu['menu-4737']); unset($menu['menu-4738']); unset($menu['menu-4889']); unset($menu['menu-4914']); unset($menu['menu-4915']); unset($menu['menu-4753']); unset($menu['menu-4754']); unset($menu['menu-4911']); unset($menu['menu-4913']); unset($menu['menu-4917']); unset($menu['menu-4998']); unset($menu['menu-5005']); unset($menu['menu-5006']); } return theme('links__system_main_menu', array('links' => $menu)); }
/** * Implements template_preprocess_page(). */ function bear_skin_preprocess_page(&$vars) { $vars['user_menu'] = theme('links', array('links' => menu_navigation_links('user-menu'), 'attributes' => array('class ' => array('links', 'site-menu')))); }
</div> </div> <!-- /center --> <div id="footer"><div class="top-border"><div class="bottom-border"> <div class="region-content"> <?php if (isset($footer_region)) { print $footer_region; } ?> <?php if (isset($primary_links)) { ?> <?php print theme('links', menu_navigation_links('menu-referral'), array('class' => 'links primary-links')); ?> <?php } ?> <?php if (isset($footer_message)) { print '<p id="footer-message">' . $footer_message . '</p>'; } ?> <span class="clear"></span> </div> </div></div></div> <!-- /footer --> </div> <!-- /container --> <?php
function _rootcandy_admin_navigation() { $path = base_path() . path_to_theme(); $base = path_to_theme(); // get users role global $user; if ($user->uid != 1) { // get sorted roles $role_menu = _rootcandy_init_role_menu(); if ($role_menu) { $rootcandy_navigation = theme_get_setting('rootcandy_navigation_source_' . $role_menu); } } else { $rootcandy_navigation = theme_get_setting('rootcandy_navigation_source_admin'); if (!isset($rootcandy_navigation)) { $rootcandy_navigation = '_rootcandy_default_navigation'; } } if (!$rootcandy_navigation) { if (!$user->uid) { $menu_tree[] = array('href' => 'user/login', 'title' => t('User login')); } } elseif ($rootcandy_navigation == '_rootcandy_default_navigation') { // build default menu $menu_tree[] = array('href' => 'admin', 'title' => t('Dashboard')); $menu_tree[] = array('href' => 'admin/content', 'title' => t('Content')); if (variable_get('node_admin_theme', '0')) { $menu_tree[] = array('href' => 'node/add', 'title' => t('Create content')); } $menu_tree[] = array('href' => 'admin/build', 'title' => t('Building')); $menu_tree[] = array('href' => 'admin/settings', 'title' => t('Configuration')); $menu_tree[] = array('href' => 'admin/user', 'title' => t('Users')); $menu_tree[] = array('href' => 'admin/reports', 'title' => t('Reports')); if (module_exists('help')) { $menu_tree[] = array('href' => 'admin/help', 'title' => t('Help')); } } else { $menu_tree = menu_navigation_links($rootcandy_navigation); } if ($menu_tree) { $size = theme_get_setting('rootcandy_navigation_icons_size'); $icons_disabled = theme_get_setting('rootcandy_navigation_icons'); $list_class = 'i' . $size; $custom_icons = rootcandy_custom_icons(); if (!isset($custom_icons)) { $custom_icons = ''; } $match = _rootcandy_besturlmatch($_GET['q'], $menu_tree); $items = array(); foreach ($menu_tree as $key => $item) { $id = ''; $icon = ''; $class = ''; // icons if (!$icons_disabled) { $size = theme_get_setting('rootcandy_navigation_icons_size'); if (!isset($size)) { $size = 24; } $arg = explode("/", $item['href']); $icon = _rootcandy_icon($arg, $size, 'admin', $custom_icons); if ($icon) { $icon = $icon . '<br />'; } } if ($key == $match) { $id = 'current'; if (!$icons_disabled && $size) { $id = 'current-' . $size; } } // add a class to li $class = ""; if (is_array($arg)) { $class = implode($arg, '-'); } $item['data'] = l($icon . $item['title'], $item['href'], array('html' => TRUE)); if (!empty($id)) { $item['id'] = $id; } if (!empty($class)) { $item['class'] = $class; } $items[] = $item; } $output .= theme('admin_navigation', $items, $list_class); } return $output; }
/** * Get the output for the footer menu. * Used in template and for ckan to pull in externally. */ function dguk_get_footer_menu() { $menu = menu_navigation_links('menu-footer'); $menu_output = theme('links__menu-footer', array('links' => $menu, 'attributes' => array('class' => array('links')))); return $menu_output; }
<?php $text = $settings['md_hosoren_copyright_text']; $menuid = $settings['md_hosoren_copyright_menu']; $menu_link = 'links__' . $menuid; ?> <div class="copyright"> <p><?php print $text; ?> </p> </div> <div class="footer-nav"> <nav> <?php $menu = menu_navigation_links($menuid); print theme($menu_link, array('links' => $menu)); ?> </nav> </div>
function rootcandy_page_alter(&$page) { // TODO: ideally we should merge these from preprocess_page // to page_alter and have just one instance of code // this is a hack at the moment, but works as expected // get users role global $user; if ($user->uid != 1) { // get sorted roles $role_menu = _rootcandy_init_role_menu(); if ($role_menu) { $rootcandy_navigation = theme_get_setting('rootcandy_navigation_source_' . $role_menu); } } else { $rootcandy_navigation = theme_get_setting('rootcandy_navigation_source_admin'); if (!isset($rootcandy_navigation)) { $rootcandy_navigation = '_rootcandy_default_navigation'; } } $rootcandy_nav['menu'] = $rootcandy_navigation; if ($rootcandy_navigation == '_rootcandy_default_navigation') { $rootcandy_nav['menu'] = 'management'; } // get admin links into the region $rootcandy_nav['level'] = 2; $menu = menu_navigation_links($rootcandy_nav['menu'], $rootcandy_nav['level']); $menu_links = theme('links', array('links' => $menu, 'attributes' => array('id' => 'content-menu'))); global $language; if (!empty($menu_links)) { if ($language->direction) { $page['sidebar_second']['nav']['#markup'] = $menu_links; } else { $page['sidebar_first']['nav']['#markup'] = $menu_links; $page['sidebar_first']['nav']['#weight'] = -100; $page['sidebar_first']['#sorted'] = FALSE; } } }
/** * Implements hook_preprocess_page(). * * @see page.tpl.php */ function bootstrap_psdpt_preprocess_page(&$variables) { global $base_url; // Internationalization Settings. global $language; $is_multilingual = 0; if (module_exists('i18n_menu') && drupal_multilingual()) { $is_multilingual = 1; } // WxT Settings. $theme_prefix = 'wb'; $theme_menu_prefix = 'wet-fullhd'; $wxt_active = variable_get('wetkit_wetboew_theme', 'wet-boew'); $library_path = libraries_get_path($wxt_active, TRUE); $wxt_active = str_replace('-', '_', $wxt_active); $wxt_active = str_replace('wet_boew_', '', $wxt_active); // Extra variables to pass to templates. $variables['library_path'] = $library_path; $variables['language'] = $language->language; $variables['language_prefix'] = $language->prefix; $variables['language_prefix_alt'] = $language->prefix == 'en' ? 'fr' : 'fra'; // Site Name. if (!empty($variables['site_name'])) { $variables['site_name_title'] = filter_xss(variable_get('site_name', 'Drupal')); $variables['site_name_unlinked'] = $variables['site_name_title']; $variables['site_name_url'] = url(variable_get('site_frontpage', 'node')); $variables['site_name'] = trim($variables['site_name_title']); } // Logo settings. $default_logo = theme_get_setting('default_logo'); $default_svg_logo = theme_get_setting('wetkit_theme_svg_default_logo'); $default_logo_path = $variables['logo']; $default_svg_logo_path = theme_get_setting('wetkit_theme_svg_logo_path'); $toggle_logo = theme_get_setting('toggle_logo'); $variables['logo_class'] = ''; $variables['logo_svg'] = ''; // Toggle Logo off/on. if ($toggle_logo == 0) { $variables['logo'] = ''; $variables['logo_svg'] = ''; $variables['logo_class'] = drupal_attributes(array('class' => 'no-logo')); } // Default Logo. if ($default_logo == 1) { $variables['logo'] = $library_path . '/assets/logo.png'; $variables['logo_svg'] = $library_path . '/assets/logo.svg'; // GCWeb or GC Intranet. if ($wxt_active == 'gcweb' || $wxt_active == 'gc_intranet') { $variables['logo'] = $library_path . '/assets/sig-blk-' . $language->language . '.png'; $variables['logo_svg'] = $library_path . '/assets/sig-blk-' . $language->language . '.svg'; } elseif ($wxt_active == 'gcwu_fegc') { $variables['logo'] = $library_path . '/assets/sig-' . $language->language . '.png'; $variables['logo_svg'] = $library_path . '/assets/sig-' . $language->language . '.svg'; } } // Custom Logo. if ($default_logo == 0) { if ($default_svg_logo == 1) { $variables['logo_svg'] = $base_url . '/' . $default_svg_logo_path; } } // Default GCWeb misc. if ($wxt_active == 'gcweb') { $variables['logo_bottom'] = $library_path . '/assets/wmms-blk' . '.png'; $variables['logo_bottom_svg'] = $library_path . '/assets/wmms-blk' . '.svg'; } // Add information about the number of sidebars. if (!empty($variables['page']['sidebar_first']) && !empty($variables['page']['sidebar_second'])) { $variables['content_column_class'] = ' class="col-sm-6"'; } elseif (!empty($variables['page']['sidebar_first']) || !empty($variables['page']['sidebar_second'])) { $variables['content_column_class'] = ' class="col-sm-9"'; } else { $variables['content_column_class'] = ''; } // Primary menu. $variables['primary_nav'] = FALSE; if ($variables['main_menu']) { // Build links. $variables['primary_nav'] = menu_tree(variable_get('menu_main_links_source', 'main-menu')); // Provide default theme wrapper function. $variables['primary_nav']['#theme_wrappers'] = array('menu_tree__primary'); } // Secondary nav. $variables['secondary_nav'] = FALSE; if ($variables['secondary_menu']) { // Build links. $variables['secondary_nav'] = menu_tree(variable_get('menu_secondary_links_source', 'user-menu')); // Provide default theme wrapper function. $variables['secondary_nav']['#theme_wrappers'] = array('menu_tree__secondary'); } // Navbar. $variables['navbar_classes_array'] = array(''); if (theme_get_setting('bootstrap_navbar_position') !== '') { $variables['navbar_classes_array'][] = 'navbar-' . theme_get_setting('bootstrap_navbar_position'); } else { $variables['navbar_classes_array'][] = ''; } // Mega Menu Region. /* if (module_exists('menu_block') && empty($variables['mega_menu'])) { $menu_name = 'main_menu'; $data = array( '#pre_render' => array('_wetkit_menu_tree_build_prerender'), '#cache' => array( 'keys' => array('bootstrap_psdpt', 'menu', 'mega_menu', $menu_name), 'expire' => CACHE_TEMPORARY, 'granularity' => DRUPAL_CACHE_PER_ROLE ), '#menu_name' => $menu_name, ); $variables['page']['mega_menu'] = $data; }*/ // Splash Page. if (current_path() == 'splashify-splash') { // GCWeb Theme. if ($wxt_active == 'gcweb') { $variables['background'] = $library_path . '/img/splash/sp-bg-2.jpg'; } } // Panels Integration. if (module_exists('page_manager')) { // Page template suggestions for Panels pages. $panel_page = page_manager_get_current_page(); if (!empty($panel_page)) { // Add the active WxT theme machine name to the template suggestions. $suggestions[] = 'page__panels__' . $wxt_active; if (drupal_is_front_page()) { $suggestions[] = 'page__panels__' . $wxt_active . '__front'; } // Add the panel page machine name to the template suggestions. $suggestions[] = 'page__' . $panel_page['name']; // Merge the suggestions in to the existing suggestions // (as more specific than the existing suggestions). $variables['theme_hook_suggestions'] = array_merge($variables['theme_hook_suggestions'], $suggestions); $variables['panels_layout'] = TRUE; } else { $suggestions[] = 'page__' . $wxt_active; // Splash Page. if (current_path() == 'splashify-splash') { $suggestions[] = 'page__splash__' . $wxt_active; } // Merge the suggestions in to the existing suggestions (as more specific // than the existing suggestions). $variables['theme_hook_suggestions'] = array_merge($variables['theme_hook_suggestions'], $suggestions); } } // Header Navigation + Language Switcher. $menu = $is_multilingual ? i18n_menu_navigation_links('menu-wet-header') : menu_navigation_links('menu-wet-header'); $nav_bar_markup = theme('links__menu_menu_wet_header', array('links' => $menu, 'attributes' => array('id' => 'menu', 'class' => array('links', 'clearfix')), 'heading' => array('text' => 'Language Selection', 'level' => 'h2'))); $nav_bar_markup = strip_tags($nav_bar_markup, '<h2><li><a>'); if (module_exists('wetkit_language')) { $language_link_markup = '<li id="' . $theme_menu_prefix . '-lang">' . strip_tags($variables['menu_lang_bar'], '<a><span>') . '</li>'; if ($wxt_active == 'gcweb') { $variables['menu_bar'] = '<ul class="list-inline margin-bottom-none">' . $language_link_markup . '</ul>'; } else { if ($wxt_active == 'gcwu_fegc') { $variables['menu_bar'] = '<ul id="gc-bar" class="list-inline">' . preg_replace("/<h([1-6]{1})>.*?<\\/h\\1>/si", '', $nav_bar_markup) . $language_link_markup . '</ul>'; } else { if ($wxt_active == 'gc_intranet') { $variables['menu_bar'] = '<ul id="gc-bar" class="list-inline">' . $language_link_markup . '</ul>'; } else { $variables['menu_bar'] = '<ul class="text-right">' . preg_replace("/<h([1-6]{1})>.*?<\\/h\\1>/si", '', $nav_bar_markup) . $language_link_markup . '</ul>'; } } } } else { $variables['menu_bar'] = '<ul class="text-right">' . preg_replace("/<h([1-6]{1})>.*?<\\/h\\1>/si", '', $nav_bar_markup) . '</ul>'; } // Custom Search Box. if (module_exists('custom_search')) { $custom_search_form_name = 'custom_search_blocks_form_1'; $custom_search = array('#pre_render' => array('__wetkit_custom_search_prerender'), '#cache' => array('keys' => array('bootstrap_psdpt', 'custom_search', $custom_search_form_name), 'expire' => CACHE_TEMPORARY, 'granularity' => DRUPAL_CACHE_PER_USER), '#custom_search_form_name' => $custom_search_form_name, '#wxt_active' => $wxt_active); $variables['custom_search'] = $custom_search; // CDN Support. if ($wxt_active == 'gcweb') { $gcweb_cdn = theme_get_setting('gcweb_cdn'); if (!empty($gcweb_cdn)) { $variables['gcweb_cdn'] = TRUE; } else { $variables['gcweb_cdn'] = FALSE; } } // Visibility settings. $pages = drupal_strtolower(theme_get_setting('wetkit_search_box')); // Convert the Drupal path to lowercase. $path = drupal_strtolower(drupal_get_path_alias($_GET['q'])); // Compare the lowercase internal and lowercase path alias (if any). $page_match = drupal_match_path($path, $pages); if ($path != $_GET['q']) { $page_match = $page_match || drupal_match_path($_GET['q'], $pages); } // When $visibility has a value of 0 (VISIBILITY_NOTLISTED), // the block is displayed on all pages except those listed in $pages. // When set to 1 (VISIBILITY_LISTED), it is displayed only on those // pages listed in $pages. $visibility = 0; $page_match = !(0 xor $page_match); if ($page_match) { $variables['search_box'] = render($variables['custom_search']); $variables['search_box'] = str_replace('type="text"', 'type="search"', $variables['search_box']); } else { $variables['search_box'] = ''; } } // Terms Navigation. $menu = $is_multilingual ? i18n_menu_navigation_links('menu-wet-terms') : menu_navigation_links('menu-wet-terms'); $class = $wxt_active == 'gcwu_fegc' || $wxt_active == 'gc_intranet' ? array('list-inline') : array('links', 'clearfix'); $terms_bar_markup = theme('links__menu_menu_wet_terms', array('links' => $menu, 'attributes' => array('id' => 'gc-tctr', 'class' => $class), 'heading' => array())); $variables['page']['menu_terms_bar'] = $terms_bar_markup; // Mid Footer Region. if (module_exists('menu_block')) { $menu_name = 'mid_footer_menu'; $data = array('#pre_render' => array('_wetkit_menu_tree_build_prerender'), '#cache' => array('keys' => array('bootstrap_psdpt', 'menu', 'footer', $menu_name), 'expire' => CACHE_TEMPORARY, 'granularity' => DRUPAL_CACHE_PER_ROLE), '#menu_name' => $menu_name); $variables['page']['footer']['minipanel'] = $data; } // Unset powered by block. unset($variables['page']['footer']['system_powered-by']); // Footer Navigation. $menu = $is_multilingual ? i18n_menu_navigation_links('menu-wet-footer') : menu_navigation_links('menu-wet-footer'); $class = $wxt_active == 'gcwu_fegc' || $wxt_active == 'gc_intranet' ? array('list-inline') : array('links', 'clearfix'); $footer_bar_markup = theme('links__menu_menu_wet_footer', array('links' => $menu, 'attributes' => array('id' => 'menu', 'class' => $class), 'heading' => array())); $variables['page']['menu_footer_bar'] = $footer_bar_markup; // Footer Navigation (gcweb). if ($wxt_active == 'gcweb') { $variables['gcweb'] = array('feedback' => array('en' => 'http://www.canada.ca/en/contact/feedback.html', 'fr' => 'http://www.canada.ca/fr/contact/retroaction.html'), 'social' => array('en' => 'http://www.canada.ca/en/social/index.html', 'fr' => 'http://www.canada.ca/fr/sociaux/index.html'), 'mobile' => array('en' => 'http://www.canada.ca/en/mobile/index.html', 'fr' => 'http://www.canada.ca/fr/mobile/index.html')); } }
function _rootcandy_admin_navigation() { $path = base_path() . path_to_theme(); $base = path_to_theme(); /** * */ // get users role global $user; if ($user->uid != 1) { // get sorted roles $role_weights = theme_get_setting('role-weight'); if ($role_weights) { $filter_out = array_keys($user->roles); $roles = array_intersect(array_flip($role_weights), $filter_out); ksort($roles); $keys = array_keys($roles); $role = $roles[$keys[0]]; $rootcandy_navigation = theme_get_setting('rootcandy_navigation_source_' . $role); } } else { $rootcandy_navigation = '_rootcandy_default_navigation'; } if (!$rootcandy_navigation) { if (!$user->uid) { $menu_tree[] = array('href' => 'user/login', 'title' => t('User login')); } } elseif ($rootcandy_navigation == '_rootcandy_default_navigation') { // build default menu $menu_tree[] = array('href' => 'admin', 'title' => t('Dashboard')); $menu_tree[] = array('href' => 'admin/content', 'title' => t('Content')); if (variable_get('node_admin_theme', '0')) { $menu_tree[] = array('href' => 'node/add', 'title' => t('Create content')); } $menu_tree[] = array('href' => 'admin/build', 'title' => t('Building')); $menu_tree[] = array('href' => 'admin/settings', 'title' => t('Configuration')); $menu_tree[] = array('href' => 'admin/user', 'title' => t('Users')); $menu_tree[] = array('href' => 'admin/reports', 'title' => t('Reports')); $menu_tree[] = array('href' => 'admin/help', 'title' => t('Help')); } else { $menu_tree = menu_navigation_links($rootcandy_navigation); } if ($menu_tree) { $size = theme_get_setting('rootcandy_navigation_icons_size'); $icons_disabled = theme_get_setting('rootcandy_navigation_icons'); $class = ' class = i' . $size; $output = '<ul' . $class . '>'; $custom_icons = rootcandy_custom_icons(); if (!isset($custom_icons)) { $custom_icons = ''; } $match = _rootcandy_besturlmatch($_GET['q'], $menu_tree); foreach ($menu_tree as $key => $item) { $id = ''; $icon = ''; $class = ''; // icons if (!$icons_disabled) { $size = theme_get_setting('rootcandy_navigation_icons_size'); if (!isset($size)) { $size = 24; } $arg = explode("/", $item['href']); $icon = _rootcandy_icon($arg, $size, 'admin', $custom_icons); if ($icon) { $icon = $icon . '<br />'; } } if ($key == $match) { $id = ' id="current"'; if (!$icons_disabled && $size) { $id = ' id="current-' . $size . '"'; } } $output .= '<li' . $id . $class . '><a href="' . url($item['href']) . '">' . $icon . $item['title'] . '</a>'; $output .= '</li>'; } $output .= '</ul>'; } return $output; }
</aside> <!-- /#sidebar-second --> <?php } ?> </div> </div> <footer class="footer container" id="footer"> <div class="col-sm-12 big_foot"> <?php print render($page['footer']); ?> <div id="footer_about_menu" class="col-xs-12 col-sm-4"> <?php $menu = menu_navigation_links('main-menu'); print theme('links__main_menu', array('links' => $menu)); ?> </div> <div class="col-xs-12 col-sm-4"> <div class="contact_foot"> <h5>Contact Us</h5> <p>Integrated Healthcare Association<br>500 12th Street, Suite 310 | Oakland, CA</p> <span id="iha_link"> <a href="//www.iha.org">www.iha.org</a> </span> <span class="iha_social"> <span> <a href="//linkedin.com/company/467230"><i class="fa fa-linkedin"></i></a> </span> <span>
if ($pinterest != null) { ?> <li class="flx-pinterest-icon"><a href="<?php print $pinterest; ?> " target="_blank"></a></li><?php } ?> </ul> <?php } ?> </center> <center> <?php $footer_menu = menu_navigation_links('menu-footer-menu'); //menu-footer-menu : Machine name of footer menu print theme('links', array('links' => $footer_menu, 'attributes' => array('class' => 'footer-menu'))); ?> </center> </div><!--end:row-fluid--> </div><!--end:wrapper--> </div><!--end:page-bottom--> <footer id="flx-footer"> <div id="footer-top"> <div class="wrapper"> <div class="row-fluid"> <?php print render($page['footer_col_1']); ?> <?php
/** * Override or insert PHPTemplate variables into the templates. */ function rootcandy_preprocess_page(&$vars) { // get secondary links $vars['tabs2'] = menu_secondary_local_tasks(); // color.module integration if (module_exists('color')) { _color_page_alter($vars); } // notify users that they can change settings in theme settings $admin_theme = variable_get('admin_theme', 'garland'); if (arg(0) == 'admin' and arg(1) == 'settings' and arg(2) == 'admin' and ($admin_theme == 'rootcandy' or $admin_theme == 'rootcandy_fixed' or $admin_theme == 'rootcandy_dark')) { $message = t('Thank you for using RootCandy.<br />Did you know, that Root Candy has advanced settings (Theme-specific settings fieldset)? You can change these settings at <a href="@configure-page">theme configuration page</a>.', array('@configure-page' => url('admin/build/themes/settings/' . $admin_theme))); $vars['messages'] .= '<div class="messages rootcandy">' . $message . '</div>'; // display a warning message if the theme has not been enabled global $theme_info; if (!$theme_info->status) { $warning_message = t('RootCandy theme has not been enabled. You won\'t be able to see theme updates on update page! Please enable the theme on <a href="@themes-page">themes page</a>.', array('@themes-page' => url('admin/build/themes'))); $vars['messages'] .= '<div class="messages warning">' . $warning_message . '</div>'; } } if (arg(0) == 'admin' || ((arg(0) == 'node' and is_numeric(arg(1)) and arg(2) == 'edit') || (arg(0) == 'node' and arg(1) == 'add'))) { $vars['go_home'] = '<a href="' . url() . '">' . t('Go Back to Homepage') . '</a>'; } // get theme settings $vars['hide_header'] = theme_get_setting('rootcandy_header_display'); $vars['hide_panel'] = theme_get_setting('rootcandy_hide_panel'); // append legal notice if (!theme_get_setting('rootcandy_hide_author')) { $vars['closure'] .= '<div id="legal-notice">Theme created by <a href="http://sotak.co.uk" rel="external">Marek Sotak</a></div>'; } $vars['hide_content'] = ''; // check whether help is disabled if (theme_get_setting('rootcandy_help_display')) { unset($vars['help']); } // dashboard if (arg(0) == 'admin' and !arg(1)) { if (!theme_get_setting('rootcandy_dashboard_display')) { $vars['dashboard'] = 1; // display help and messages in regions switch (theme_get_setting('rootcandy_dashboard_help')) { case 'left': $vars['dashboard_left'] = $vars['help'] . $vars['dashboard_left']; unset($vars['help']); break; case 'right': $vars['dashboard_right'] = $vars['help'] . $vars['dashboard_right']; unset($vars['help']); break; } switch (theme_get_setting('rootcandy_dashboard_messages')) { case 'left': $vars['dashboard_left'] = $vars['messages'] . $vars['dashboard_left']; unset($vars['messages']); break; case 'right': $vars['dashboard_right'] = $vars['messages'] . $vars['dashboard_right']; unset($vars['messages']); break; } } if (theme_get_setting('rootcandy_dashboard_content_display')) { $vars['hide_content'] = theme_get_setting('rootcandy_dashboard_content_display'); } } $vars['panel_navigation'] = '<a id="open" class="open" href="#"><span class="panel-open">' . t('Open Panel') . '</span></a>'; $vars['panel_navigation'] .= '<a id="close" style="display: none;" class="close" href="#"><span class="panel-close">' . t('Close Panel') . '</span></a>'; $rootcandy_nav = _rootcandy_admin_navigation(); $vars['rootcandy_navigation'] = $rootcandy_nav['navigation']; // get admin links into the region if (arg(0) == 'admin' and arg(2)) { $menu = menu_navigation_links($rootcandy_nav['menu'], $rootcandy_nav['level']); $menu_links = _rootcandy_links($menu, array('id' => 'rootcandy-menu')); if ($vars['language']->direction) { $vars['admin_right'] = $menu_links . $vars['admin_right']; } else { $vars['admin_left'] = $menu_links . $vars['admin_left']; } } $vars['body_class'] = rootcandy_body_class($vars['admin_left'], $vars['admin_right']); $icons_disabled = theme_get_setting('rootcandy_navigation_icons'); $rootcandy_navigation_class = array(); if (!$icons_disabled) { $rootcandy_navigation_class[] = 'i' . theme_get_setting('rootcandy_navigation_icons_size'); } if (!$vars['hide_header']) { $rootcandy_navigation_class[] = 'header-on'; } $vars['rootcandy_navigation_class'] = ''; if ($rootcandy_navigation_class) { $vars['rootcandy_navigation_class'] .= ' ' . implode(' ', $rootcandy_navigation_class); } global $user; if ($user->uid) { $links[] = '<a href="' . url('user') . '" class="user-name">' . $user->name . '</a>'; $links[] = '<a href="' . url('logout') . '">' . t('Logout') . '</a>'; $links = implode(' | ', $links); $vars['rootcandy_user_links'] = $links; } }
* @see template_preprocess_page() * @see bootstrap_process_page() * @see template_process() * @see html.tpl.php * * @ingroup themeable */ ?> <header id="navbar" role="banner" class="navbar navbar-default navbar-static-top"> <div class="topbar col-lg-12"> <div class="container"> <div class="topitems"> <div class="toplinks"> <?php $menu = menu_navigation_links('menu-top-bar-menu'); print theme('links__menu_top_bar_menu', array('links' => $menu)); ?> <div class="apisearch"> <?php print $search_box; ?> </div> <div class="apilang"> </div> </div> </div> <?php if (!empty($page['header'])) { ?> <section class ="col-lg-12">
<ul class="list-inline socail"> <li><a href="#"><i class="fa fa-twitter"></i></a></li> <li><a href="#"><i class="fa fa-instagram"></i></a></li> <li><a href="#"><i class="fa fa-facebook"></i></a></li> <li><a href="#"><i class="fa fa-linkedin-square"></i></a></li> <li><a href="#"><i class="fa fa-youtube"></i></a></li> <li><a href="#"><i class="fa fa-google-plus-square"></i></a></li> </ul> </div> </div> <div class="row footer-btm" style="margin-bottom:0; padding-top:40px;"> <div class="container"> <div class="col-md-6"> Copyright © International Islamic University Malaysia. All rights reserved. </div> <div class="col-md-6 list-inline text-right"> <?php $menu = menu_navigation_links('menu-footer'); print theme('links__menu-footer', array('links' => $menu)); ?> </div> </div> </div> </div> </footer><script src="js/limit.js"></script> <script src="js/zA7n.js"></script> <script> $(function(){ $('#slide-submenu').on('click',function() { $(this).closest('.list-group').fadeOut('slide',function(){ $('.mini-submenu').fadeIn(); });
function _lullacog_process_menus(&$vars) { // Add the footer links if (function_exists('context_get_plugin')) { $plugin = context_get_plugin('reaction', 'menu'); $vars['primary_links_sub'] = $plugin->menu_navigation_links(variable_get('menu_primary_links_source', 'primary-links'), 1); $vars['secondary_links_sub'] = $plugin->menu_navigation_links(variable_get('menu_secondary_links_source', 'secondary-links'), 1); $vars['footer_links'] = $plugin->menu_navigation_links('footer-links'); } else { $vars['primary_links_sub'] = menu_navigation_links(variable_get('menu_primary_links_source', 'primary-links'), 1); $vars['secondary_links_sub'] = menu_navigation_links(variable_get('menu_secondary_links_source', 'secondary-links'), 1); $vars['footer_links'] = menu_navigation_links('footer-links'); } $menus = array('primary_links', 'primary_links_sub', 'secondary_links', 'secondary_links_sub', 'footer_links'); foreach ($menus as $menu_name) { if (isset($vars[$menu_name])) { $vars[$menu_name . '_html'] = theme('links', $vars[$menu_name]); } } // Also set up a full tree menu for the footer links. $vars['footer_links_tree'] = menu_tree('footer-links'); }
echo render($login_block['content']); ?> </div> <div id="xs-search" class="col-xs-12 tab-pane"><?php $search_block = module_invoke('search', 'block_view', ''); echo render($search_block['content']); ?> </div> </div> </div> <div class="row"> <div id="menu" class="menu clearfix col-xs-8 hidden-xs"> <?php echo theme('links', array('links' => menu_navigation_links('main-menu'))); ?> <div class="clearfix"></div> </div> <div id="header-blocks" class="col-xs-4 hidden-xs"> <div id="social_icons"> <ul> <?php $social_settings = array('linkin' => t('Link In'), 'youtube' => t('Youtube'), 'facebook' => t('Facebook'), 'twitter' => t('Twitter')); foreach ($social_settings as $key => $value) { ?> <li><a href="<?php echo theme_get_setting($key); ?>
/** * Implements template_preprocess_block(). */ function ec_resp_preprocess_block(&$variables) { global $user, $language; $block_no_panel = array('search' => 'form', 'print' => 'print-links', 'print_ui' => 'print-links', 'workbench' => 'block', 'social_bookmark' => 'social-bookmark', 'views' => 'view_ec_content_slider-block', 'om_maximenu' => array('om-maximenu-1', 'om-maximenu-2'), 'menu' => 'menu-service-tools', 'cce_basic_config' => 'footer_ipg'); // List of all blocks that don't need their title to be displayed. $block_no_title = array('fat_footer' => 'fat-footer', 'om_maximenu' => array('om-maximenu-1', 'om-maximenu-2'), 'menu' => 'menu-service-tools', 'cce_basic_config' => 'footer_ipg'); $block_no_body_class = array(); $panel = TRUE; foreach ($block_no_panel as $key => $value) { if ($variables['block']->module == $key) { if (is_array($value)) { foreach ($value as $delta) { if ($variables['block']->delta == $delta) { $panel = FALSE; break; } } } else { if ($variables['block']->delta == $value) { $panel = FALSE; break; } } } } $title = TRUE; foreach ($block_no_title as $key => $value) { if ($variables['block']->module == $key) { if (is_array($value)) { foreach ($value as $delta) { if ($variables['block']->delta == $delta) { $title = FALSE; break; } } } else { if ($variables['block']->delta == $value) { $title = FALSE; break; } } } } $body_class = TRUE; foreach ($block_no_body_class as $key => $value) { if ($variables['block']->module == $key && $variables['block']->delta == $value) { $body_class = FALSE; } } $variables['panel'] = $panel; $variables['title'] = $title; $variables['body_class'] = $body_class; if (isset($variables['block']->bid)) { switch ($variables['block']->bid) { case 'locale-language': $languages = language_list(); $items = array(); $items[] = array('data' => '<span class="off-screen">' . t("Current language") . ':</span> ' . $language->language, 'class' => array('selected'), 'title' => $language->native, 'lang' => $language->language); // Get path of translated content. $translations = translation_path_get_translations(current_path()); $language_default = language_default(); foreach ($languages as $language_object) { $prefix = $language_object->language; $language_name = $language_object->name; if (isset($translations[$prefix])) { $path = $translations[$prefix]; } else { $path = current_path(); } // Get the related url alias // Check if the multisite language negotiation // with suffix url is enabled. $language_negociation = variable_get('language_negotiation_language'); if (isset($language_negociation['locale-url-suffix'])) { $delimiter = variable_get('language_suffix_delimiter', '_'); $alias = drupal_get_path_alias($path, $prefix); if ($alias == variable_get('site_frontpage', 'node')) { $path = $prefix == 'en' ? '' : 'index'; } else { if ($alias != $path) { $path = $alias; } else { $path = drupal_get_path_alias(isset($translations[$language_name]) ? $translations[$language_name] : $path, $language_name); } } } else { $path = drupal_get_path_alias($path, $prefix); } // Add enabled languages. if ($language_name != $language->name) { $items[] = array('data' => l($language_name, filter_xss($path), array('attributes' => array('hreflang' => $prefix, 'lang' => $prefix, 'title' => $language_name), 'language' => $language_object))); } } $variables['language_list'] = theme('item_list', array('items' => $items)); break; case 'system-user-menu': if ($user->uid) { $name = theme('username', array('account' => $user, 'nolink' => TRUE)); $variables['welcome_message'] = "<div class='username'>" . t('Welcome,') . ' <strong>' . $name . '</strong></div>'; } $menu = menu_navigation_links("user-menu"); $items = array(); // Manage redirection after login. $status = drupal_get_http_header('status'); if (strpos($status, '404') !== FALSE) { $dest = 'home'; } elseif (strpos(current_path(), 'user/register') !== FALSE) { $dest = 'home'; } elseif (strpos(current_path(), 'user/login') !== FALSE) { $dest = 'home'; } else { $dest = drupal_get_path_alias(); } foreach ($menu as $item_id) { // Get icon links to menu item. $icon = isset($item_id['attributes']['data-image']) ? $item_id['attributes']['data-image'] : ''; // Get display title option. $display_title = isset($item_id['attributes']['data-display-title']) ? $item_id['attributes']['data-display-title'] : 1; // Add the icon. if ($icon) { if ($display_title) { $item_id['title'] = '<span class="glyphicon glyphicon-' . $icon . '" aria-hidden="true"></span> ' . $item_id['title']; } else { // If the title is not supposed to be displayed, add a visually // hidden title that is accessible for screen readers. $item_id['title'] = '<span class="glyphicon glyphicon-' . $icon . ' menu-no-title" aria-hidden="true"></span><span class="sr-only">' . $item_id['title'] . '</span>'; } } // Add redirection for login, logout and register. if ($item_id['href'] == 'user/login' || $item_id['href'] == 'user/register') { $item_id['query']['destination'] = $dest; } if ($item_id['href'] == 'user/logout') { $item_id['query']['destination'] = '<front>'; } // Add icon before menu item // TODO: make it editable in administration. switch ($item_id['href']) { case 'user': $item_id['attributes']['type'] = 'user'; break; case 'user/login': $item_id['attributes']['type'] = 'login'; break; case 'user/logout': $item_id['attributes']['type'] = 'logout'; break; case 'admin/workbench': $item_id['attributes']['type'] = 'workbench'; break; } $item_id['html'] = TRUE; $items[] = l($item_id['title'], $item_id['href'], $item_id); } $variables['menu_items'] = implode('', $items); break; case 'easy_breadcrumb-easy_breadcrumb': $variables['menu_breadcrumb'] = menu_tree('menu-breadcrumb-menu'); break; } } }
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> <nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar" class="navbar-toggle collapsed"><span class="sr-only">Toggle button</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><a href="/fbappCasaBienestar"><img src="<?php print base_path() . path_to_theme(); ?> /images/logo-nestle-blanco.svg" alt="NESTLÉ&reg; A gusto con la vida" class="img-responsive logo-franja"></a> </div> <div id="navbar" aria-expanded="false" class="navbar-collapse collapse"> <?php $menu = menu_navigation_links('menu-casabienestar'); print theme('links__menu_casabienestar', array('links' => $menu, 'attributes' => array('class' => array('nav navbar-nav')))); ?> <ul class="nav navbar-nav navbar-right"> <li class="social-link social-links-facebok"><a href="https://www.facebook.com/nestle.colombia" rel="nofollow" target="_blank"><span class="fa fa-facebook"></span></a></li> <li class="social-link social-links-twitter"><a href="https://twitter.com/NestleColombia" rel="nofollow" target="_blank"><span class="fa fa-twitter"></span></a></li> <li class="social-link social-links-youtube"><a href="https://www.youtube.com/user/Nestlecol" rel="nofollow" target="_blank"><span class="fa fa-youtube"></span></a></li> </ul> </div> </div> <!-- /.section, /#navigation --> </div> </nav> </div>
* - $block_zebra: Outputs 'odd' and 'even' dependent on each block region. * - $zebra: Same output as $block_zebra but independent of any block region. * - $block_id: Counter dependent on each block region. * - $id: Same output as $block_id but independent of any block region. * - $is_front: Flags true when presented in the front page. * - $logged_in: Flags true when the current user is a logged-in member. * - $is_admin: Flags true when the current user is an administrator. * - $block_html_id: A valid HTML ID and guaranteed unique. * * @see template_preprocess() * @see template_preprocess_block() * @see template_process() * * @ingroup themeable */ $meunItems = menu_navigation_links($block->delta); ?> <div id="<?php print $block_html_id; ?> " class="<?php print $classes; ?> "<?php print $attributes; ?> > <?php print render($title_prefix);
?> </title> <?php print $head; ?> <?php print $styles; ?> <?php print $scripts; ?> </head> <?php // get admin links into the region if (arg(0) == 'admin' and arg(2)) { $menu = menu_navigation_links('navigation', 2); $menu_links = _rootcandy_links($menu, array('id' => 'rootcandy-menu')); if ($language->direction) { $admin_right = $menu_links . $admin_right; } else { $admin_left = $menu_links . $admin_left; } } ?> <body<?php print rootcandy_body_class($admin_left, $admin_right); ?> > <!-- Layout --> <div id="page-wrapper"><div id="page-wrapper-content">
<?php /** * @file: _footer.tpl.php * @author: arjun<*****@*****.**> * @date: Mar 27, 2014 3:51:15 PM * @encode: UTF-8 */ ?> <!-- Footer Wrapper --> <div id="footer" class="clearfix"> <div class="main-wrapper container clearfix"> <div id="footer-menu" class="menu clearfix"> <?php echo theme('links', array('links' => menu_navigation_links('menu-footer-menu'))); ?> </div> <div class="spr"><span></span></div> <div id="copyright"> <div id="parent-site"> <!-- <?php echo t('Parent Site:'); ?> <a href="<?php echo url('<front>'); ?> ">copyright © 2014 Z101digital.com</a> --> © 2014 <a href="<?php
function print_masterhead(){ if(menu_get_active_menu_name()=='secondary-links') { $menu_theme = menu_navigation_links("secondary-links",0); foreach ($menu_theme as $value) { if (isset($value['title']) && ($value['href'] == $_GET['q']) ||($value['href'] == '<front>' && drupal_is_front_page())) { $masthead = $value['title']; } } } else { $menu_theme = menu_navigation_links("primary-links",0); $menu_theme2 = menu_navigation_links("primary-links",1); foreach ($menu_theme as $value) { if (isset($value['title']) && ($value['href'] == $_GET['q']) ||($value['href'] == '<front>' && drupal_is_front_page())) { $masthead = l($value['title'],$value['href']); } } } if($masthead=="") { $arr_bread = menu_get_active_breadcrumb(); $masthead = $arr_bread[1]; } if(arg(0)=='node' && is_numeric(arg(1)) ) { $masthead = ""; } if(arg(0)=='alimsearch') { $masthead = "Search"; } if(arg(1)=='158036' || arg(1)=='158915') { $masthead = "Qur'an & Hadith"; } if(arg(0)=='news') { $masthead = "News & Views"; } if(arg(0)=='testimonials') { $masthead = "Testimonials"; } if(arg(1)=='164550') { $masthead = "Widgets"; } if(arg(0)=='alimrecentcomments') { $masthead = "Recent Comments"; } if(arg(1)=='163664') { $masthead = "Donate"; } if(arg(1)=='163663') { $masthead = "Donate"; } if(arg(1)=='scholarpage') { $masthead = 'Advisers and Scholars'; } if(arg(1)=='scholars') { $masthead = 'Advisers and Scholars'; } if(arg(2)=='our-advisers-and-scholars') { $masthead = 'Advisers and Scholars'; } if(arg(1)=='132481') { $masthead = "Nonprofit Services"; } if(arg(1)=='132482') { $masthead = " Books"; } if(arg(1)=='163674') { $masthead = " Toolbar"; } if(arg(1)=='163647') { $masthead = " Get Widgets"; } if(arg(1)=='163827') { $masthead = " Recent Comments Feed"; } if(arg(0)=='recent-group-posts'){ $masthead = 'Recent Group Posts'; } if(arg(1)=='all-recent-tags') { $masthead = 'Recent Tags'; } if(arg(1)=='biography' || arg(1)=='history') { $masthead = 'History'; } if(arg(1)=='references' || arg(1)==163997) { $masthead = 'References'; } if(arg(2)=='article' ) { $masthead = 'About Islam'; } # User Profile if(arg(0)=='userprofile') { $masthead = "Profile"; } if(arg(2)=='creat-group') { $masthead = 'Creat Group'; } if(arg(2)=='group-post') { $masthead = 'Creat Group Post'; } if(arg(0)=='groups' && arg(1)=='users') { $masthead = 'Group Members'; } if(arg(1)=='163738') { $masthead = 'Manage Groups'; } if(arg(0)=='searchusers') { $masthead = 'Search Users'; } if(arg(0)=='searchgroups') { $masthead = 'Search Groups'; } if(arg(0)=='groupdetails') { $masthead = "Group"; } if(arg(0)=='user' && arg(2)=='edit') { $masthead = 'Edit Profile'; } if(arg(0)=='relationships') { $masthead = 'My Relationships'; } if(arg(0) == 'bookmarks') { $masthead = "Bookmarks";} $preAlias = $_SERVER['REQUEST_URI']; $alias = explode("/",$preAlias); if(arg(0)=='blogs' || $alias[1]=='blog'){ $masthead = "Blogs";} if(arg(0)=='news' || $alias[1]=='news'){ $masthead = "News & Views";} return $masthead; }
?> <div id="site-slogan"><?php print $site_slogan; ?> </div> <?php } ?> </div><!-- /#name-and-slogan --> <?php } ?> <ul id="secondary-menu" class="links inline clearfix"> <?php $user_menu = menu_navigation_links('user-menu'); print theme('links', array('links' => $user_menu, 'attributes' => array('id' => 'user-menu', 'class' => array('links', 'clearfix')), 'heading' => array('text' => t('User menu'), 'level' => 'h2', 'class' => array('element-invisible')))); ?> </ul> <?php print render($page['header']); ?> </div></div><!-- /.section, /#header --> <div class="hr-placeholder"></div> <div id="main-wrapper"><div id="main" class="clearfix<?php if ($main_menu || $page['navigation']) { print ' with-navigation'; } ?>
/** * Implements template_preprocess_page(). * 1. Check if sidebars have content; Add boolean to $variables * 2. Setup the user menu (by default displayed in header) */ function bear_skin_preprocess_page(&$variables) { $page = $variables['page']; // set the page title for the homepage // for accessibility purposes $title = drupal_get_title(); if (drupal_is_front_page() && empty($title)) { $variables['bear_page_title'] = variable_get('site_name', '') . ' Homepage'; } else { $variables['bear_page_title'] = $title; } // check if there is content in the sidebars $variables['has_sidebar_first'] = FALSE; $variables['has_sidebar_second'] = FALSE; if (!empty($page['sidebar_first'])) { $variables['has_sidebar_first'] = TRUE; } if (!empty($page['sidebar_second'])) { $variables['has_sidebar_second'] = TRUE; } // setup the user menu to display in the header $variables['user_menu'] = theme('links__user_menu', array('links' => menu_navigation_links('user-menu'), 'attributes' => array('class ' => array('nav-user__list'), 'aria-labelledby' => 'userMenuLabel'))); // include the basic search form if one exists if (module_exists('search')) { $bear_search_form = module_invoke('search', 'block_view', 'search'); $variables['page']['bear_search_form'] = render($bear_search_form); } }