You are here

function dhtml_menu_menu in DHTML Menu 5

Same name and namespace in other branches
  1. 8 dhtml_menu.module \dhtml_menu_menu()
  2. 6.4 dhtml_menu.module \dhtml_menu_menu()
  3. 6 dhtml_menu.module \dhtml_menu_menu()
  4. 6.2 dhtml_menu.module \dhtml_menu_menu()
  5. 6.3 dhtml_menu.module \dhtml_menu_menu()
  6. 7 dhtml_menu.module \dhtml_menu_menu()

Implementation of hook_menu().

File

./dhtml_menu.module, line 14
DHTML menus

Code

function dhtml_menu_menu($may_cache) {
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/settings/dhtml_menu',
      'title' => t('DHTML Menu'),
      'description' => t('Configure jQuery slide effect and Duplicated menu items.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'dhtml_menu_settings',
      ),
      'access' => user_access('administer menu'),
    );
    $items[] = array(
      'path' => 'admin/settings/dhtml_menu/replace-navigation',
      'title' => t('Replace navigation block'),
      'callback' => '_dhtml_menu_replace',
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK,
    );
    return $items;
  }
  else {
    $path = drupal_get_path('module', 'dhtml_menu');
    drupal_add_js(array(
      'dhtmlMenu' => array(
        'useEffects' => variable_get('dhtml_menu_use_effects', 1),
      ),
    ), 'setting');
    drupal_add_js($path . '/dhtml_menu.js');
  }
}