menu

Adding tab

  1. function uc_deliverynote_menu_alter(&$items) {
  2. $items['admin/store/orders/%uc_order/deliverynote'] = array(
  3.     'page callback' => 'uc_deliverynote_report',
  4.     'access arguments' => array('view al

Hide title for pages in the primary links menu

  1. /**
  2.  * Hide the title of the page if there is an entry for its path in the primary-menu (at any depth).
  3.  * Usefull when primary links use huge font, to avoid repeating the same information on screen.
  4.  *

Fix for Fix for Creating a simple menu entry

  1. /*
  2.  * I'm trying to create a menu item that links to 'author/<username>', where username is the name of the logged in user.
  3.  * The menu has no callback associated, it's just a simple menu item, poin

Fix for Creating a simple menu entry

  1. /*
  2.  * I'm trying to create a menu item that links to 'author/<username>', where username is the name of the logged in user.
  3.  * The menu has no callback associated, it's just a simple menu item, poin

Creating a simple menu entry

  1. /*
  2.  * I'm trying to create a menu item that links to 'author/<username>', where username is the name of the logged in user.
  3.  * The menu has no callback associated, it's just a simple menu item, poin

Dynamically changing menu items on !$may_cache

  1.     foreach (taxonomy_get_vocabularies() as $vocabulary) {
  2.       if (_taxonomy_navigation_is_supported($vocabulary) && variable_get('taxonomy_navigation_show_' . $vocabulary->vid, 0)) {

search block default value

  1. function YOUR_MODULE_form_alter(&$form, &$form_state, $form_id) {
  2.   if ($form_id == 'search_block_form') {
  3.     $item = menu_get_item();
  4.     if ($item['map'][0] == 'search') {

bones_menu()

  1. /**
  2.  * Implementation of hook_menu().
  3.  */
  4. function bones_menu() {
  5.  
  6.   $items['admin/build/bones'] = array(
  7.     'title' => 'Bones',

custom menutrail block

  1. function withington_tweaks_menutrailsub() {
  2.  
  3.   $links = menutrails_primary_links(2);
  4.  
  5.  
  6.   $pid = variable_get('menu_primary_menu', 0);
  7.   $i = _menu_get_active_trail_in_submenu($pid);

customize menus by theme override

  1.  This code snippet I took  from internet services 2 theme, they use it to change primary links
  2.  now I want to customize my menu in the same way
Syndicate content