Friday, December 17, 2010

make your custom menu link to support overlay in Drupal 7 D7

make your custom menu link to support overlay in Drupal 7 D7

Overlay (and admin)


Why: because people often lose context when doing an admin task. With the overlay module, when you are through with your admin task, you are returned to where you were before you started.

You tell a link to open in the overlay by specifying that it is an “admin” link. Implement hook_admin_paths()

<?php
/**
 * Implementation of hook_admin_paths()
 */
function mymodule_admin_paths() {
  $paths = array (
    'my_first_link' => TRUE,
    'my_second_link' => TRUE,
  );

  return $paths;
}
?>

To alter admin paths set by other modules, use hook_admin_paths_alter().

Additional Resources
http://drupal.org/ui-standards

No comments: