menu

active menu title

  1. <?php
  2. $menuParent = menu_get_active_trail();
  3.  
  4. if (isset($menuParent[1]['link_title'])) {
  5. ?>
  6. <h2 class="section-heading">
  7. <?php
  8.   $menuParent = $menuParent[1]['link_title'];
  9.   print_r($menuPare

Get parent menu item

  1. $menuParent = menu_get_active_trail();
  2. //Since it returns an array, make sure to target what you are looking for
  3. //You should print_r what menu_get_active_trail() to see what else it gives you
  4. $men

Printing system menu

  1.     <?php if ($main_menu): ?>
  2.       <?php print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'inline', 'clearfix'

Fix for Trying to add '<span>' tag to the menu

  1. function theme_menu_link(array $variables) {
  2.   $element = $variables['element'];
  3.   $sub_menu = '';
  4.  
  5.   if ($element['#below']) {
  6.     $sub_menu = drupal_render($element['#below']);
  7.   }
  8.  
  9.   $tit

Trying to add '<span>' tag to the menu

  1. function theme_menu_link(array $variables) {
  2.   $element = $variables['element'];
  3.   $sub_menu = '';
  4.  
  5.   if ($element['#below']) {
  6.     $sub_menu = drupal_render($element['#below']);
  7.   }
  8.  
  9.   $tit

Fix for white screen in Drupal 6

  1. /**
  2.  * Implementation of hook_menu().
  3.  */
  4. function letters_menu($may_cache) {
  5.   $items = array();
  6.   $items['letter'] = array(
  7.     'path' => ,
  8.     'title' => t('Write a letter to the editor'),

Re:

  1. People in every country take the <a href="http://bestfinance-blog.com/topics/mortgage-loans">mortgage loans</a> in various creditors, because that is comfortable and fast.

Wrap links in span tags

  1. function THEMENAME_links($links, $attributes = array('class' => 'links')) {
  2.   global $language;
  3.   $output = '';
  4.   if (isset($attributes['add_span'])) {
  5.     $span_class = $attributes['add_span'];

Fix for expanded menu overide for set MID - needs to collapse MID properly when not ative

  1. /**
  2. * Implementation of theme_menu_item().
  3. * Add active class and custom id to current menu item links.
  4. */
  5. function zen_menu_item($mid, $children = '', $leaf = TRUE) {
  6.   // store a list of the me

expanded menu overide for set MID - needs to collapse MID properly when not ative

  1. /**
  2. * Implementation of theme_menu_item().
  3. * Add active class and custom id to current menu item links.
  4. */
  5. function zen_menu_item($mid, $children = '', $leaf = TRUE) {
  6.   // store a list of the me
Syndicate content