You are here

function layout_menu_alter in Layout 7

Implementation of hook_menu_alter().

File

./layout.module, line 26
Responsive layout builder tool for Panels.

Code

function layout_menu_alter(&$items) {

  // Convert the automatically created ctools menu items to local tasks.
  if (isset($items['admin/structure/panels/layouts/breakpoints'])) {
    $items['admin/structure/panels/layouts/breakpoints']['type'] = MENU_LOCAL_TASK;
  }
  if (isset($items['admin/structure/panels/layouts/regions'])) {
    $items['admin/structure/panels/layouts/regions']['type'] = MENU_LOCAL_TASK;
  }

  // Hide this local action so its not visible anymore in Panels.
  if (isset($items['admin/structure/panels/layouts/add-flexible'])) {
    $items['admin/structure/panels/layouts/add-flexible']['type'] = MENU_CALLBACK;
    $items['admin/structure/panels/layouts/add-responsive']['title'] = 'Add layout';

    // Modify the title on the 'List' tab, although this makes it pretty
    // non-standard, by putting more things on the same level (breakpoints,
    // grids and regions by side of layouts), it becomes confusing as long
    // as the tab is labeled 'List'.
    $items['admin/structure/panels/layouts/list']['title'] = 'Layouts';
  }
}