当前位置: 首页>>代码示例>>PHP>>正文


PHP menu_navigation_links函数代码示例

本文整理汇总了PHP中menu_navigation_links函数的典型用法代码示例。如果您正苦于以下问题:PHP menu_navigation_links函数的具体用法?PHP menu_navigation_links怎么用?PHP menu_navigation_links使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了menu_navigation_links函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: equinox_preprocess_page

/**
 * @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);
}
开发者ID:rjelierse,项目名称:equinox,代码行数:42,代码来源:template.php

示例2: hubclip_preprocess_page

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'))));
}
开发者ID:kendraio,项目名称:kendra_hub_v1,代码行数:7,代码来源:template.php

示例3: rootcandy_preprocess_page

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;
  }
}
开发者ID:rtdean93,项目名称:Missio-Solutions,代码行数:35,代码来源:template.php

示例4: vdb_preprocess_page

/**
 * 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();
}
开发者ID:paulalbert1,项目名称:vivodashboard,代码行数:12,代码来源:modifications.php

示例5: vozmob_white_label_preprocess_page

/**
 * 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'));
}
开发者ID:vojodotco,项目名称:vozmob,代码行数:17,代码来源:template.php

示例6: alternator_preprocess_page

/**
 * 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;
}
开发者ID:kbib,项目名称:alternator,代码行数:22,代码来源:template.php

示例7: sca_responsive_get_main_menu

/**
 * 
 * 
 * @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));
}
开发者ID:saulelis,项目名称:sca_responsive,代码行数:27,代码来源:template.php

示例8: bear_skin_preprocess_page

/**
 * 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'))));
}
开发者ID:zivtech,项目名称:bear_skin,代码行数:7,代码来源:template.php

示例9: theme

			</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 
开发者ID:sillygwailo,项目名称:Fenchurch,代码行数:31,代码来源:page-flickr.tpl.php

示例10: _rootcandy_admin_navigation

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;
}
开发者ID:rfay,项目名称:junker99,代码行数:89,代码来源:template.php

示例11: dguk_get_footer_menu

/**
 * 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;
}
开发者ID:davidread,项目名称:dgu_d7,代码行数:10,代码来源:template.php

示例12: menu_navigation_links

<?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>
开发者ID:aposidelov,项目名称:copfun1,代码行数:21,代码来源:copyright.tpl.php

示例13: rootcandy_page_alter

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;
        }
    }
}
开发者ID:espixxl,项目名称:topguay,代码行数:38,代码来源:template.php

示例14: bootstrap_psdpt_preprocess_page


//.........这里部分代码省略.........
        // 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;
开发者ID:atssc-scdata,项目名称:bootstrap_psdpt,代码行数:67,代码来源:page.vars.php

示例15: _rootcandy_admin_navigation

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;
}
开发者ID:noslokire,项目名称:Project-206,代码行数:81,代码来源:template.php


注:本文中的menu_navigation_links函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。