Implementing duplicated menus

This code was built for a project which included:

  • the ability to create menus
  • the ability to have duplicated menus
  • having a sidebar that contains the current selected menu

By adding node/1?b=1 at the end of the menus that were duplicated, a simple operation could verify if they menu was selected or not.

Fixing duplication requires that everytime a menu is saved, we go through the menu structure again to fix the problematic menus appending ?b=X at the end. You can either push a button in the admin interface or just modify them, as it hook on menu_link_alter.


<?php

function duplicated_menus_menu() {
$items['admin/settings/duplicated_menus'] = array(
'title' => 'Duplicated menus admin page',
'page callback' => 'drupal_get_form',
'page arguments' => array('duplicated_menus_admin_form'),
'access arguments' => array('access content'),
'type' => MENU_NORMAL_ITEM,
);
return $items;
}
function duplicated_menus_admin_form() {
$form = array();
$form['description'] = array(
'#type' => 'markup',
'#value' => t('This button force reloading the primary menus to add proper menu numbering allowing duplicates to have their own predefinite paths'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Reload primary links'),
);
return $form;

MeSH Vocabulary

The MeSH Vocabulary module provides a convenient method to import the large Medical Subject Headings thesaurus and also a modal popup to provide more efficient browsing.

MeSH format

This module makes use of the "MeSH Trees" format. This format allows for a reasonably fast import and preservation of term hierarchy. The XML format more commonly used includes a large amount of superfluous information and, at 260MB in size, not a viable option for a web-based import.

MeSH browser

Using the CTools modal dialog, this module overrides the default taxonomy widget to instead use an AJAX modal browser. All other taxonomies are rendered using the normal widget.

MeSH import process

  1. Download the MeSH Trees file from the above site.
  2. Navigate to Administer > Taxonomy > MeSH.
  3. Select the correct MeSH year (sets the top-level headers).
  4. Upload the MeSH Trees file.
  5. Save configuration.
  6. Click "Populate MeSH vocabulary" to begin the import process.
  7. After completion, you may add the MeSH vocabulary to any content type to use.

System Requirements

    Installing LayoutStudio 2.x for Drupal 6

    A YouTube video showing the installation process is also available

    1. Download LayoutStudio

    2. Unpack the downloaded file, and place the layoutstudio folder in your sites/all/themes

    Installing LayoutStudio 1.x for Drupal 7

    A YouTube video showing the installation process is also available

    1. Download LayoutStudio

    2. Unpack the downloaded file, and place the layoutstudio folder in your sites/all/themes

    Drupal 7 nu tillgänglig världen över

    Drupal är den mest innovativa plattformen för sociala och semantiska webbplatser och nu enklare än någonsin att använda.

    Pages

    Subscribe with RSS Subscribe to RSS - Needs copy/style review