Install

Works with Drupal: ^10

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 14.89 KB
MD5: e1d63e4938d4c41e4305ca4f5fef956e
SHA-1: 0adc2303701b7c3dd037f2602dd91a0225411cdb
SHA-256: 5a0f58341e2d0474f3b7323edf23b297e7b04bdff1f22ae696611c4913c51613
Download zip 22.7 KB
MD5: 69ea313f9bcb4cf324a7ba96557df98c
SHA-1: 5c0818945e0bdd639ea22dda166091420c82cb74
SHA-256: ffd97349117349362dab2c438927c8ddd0449e8f92f5bceedf88b8ff4d2e1fa4

Release notes

This release improves the module README documentation, adds the multilingual support and offers the possibility of altering the menu item array before being imported.

New Features

Menu items will now import/export the translations as well.

A new event was added that is fired right before the process of importing a menu item: MenuImportEvent.
The main purpose of this event is to offer the possibility of editing menu items before import so that the domain or any other relevant property are changed on demand. This is useful when using a multisite setup where you'd want to link Site A to Site B, but not only, and while doing that to still keep the production structure exported and untouched.
To use this feature, add the following settings to the environment in need:

// Menu Migration replacements.
$settings['menu_migration_replacements'] = [
  // Add as many as needed.
  [
    // Example for the link of the menu item. This is the nested key.
    'parents' => ['link', 'uri'],
    // The function to call for the current nested key.
    'method' => 'str_replace',
    // The arguments to pass to the
    'arguments' => [
      'example.com',
      'local.example.com',
      // "[SUBJECT]" is a token that will be replaced with the actual value. Mandatory.
      '[SUBJECT]',
    ],
  ],

"[SUBJECT]" will be replaced by the actual value under the given parents. This token is also defined in the Event itself MenuImportEvent:IMPORT_MENU_SUBJECT_TOKEN. "method" is a php function of choice that should be called on the value, and the "arguments" are passed to the function.

Issues

The following issues have been fixed:

  • #3397627: Show target folder on export/import page, to clarify where the file(s) will be exported to
  • #3405842: Emphasize that menu items should only be added via menus, not views
  • #3347964: Add multilingual support
  • #3407787: Allow menu item alteration per environment before import
Created by: bbu23
Created on: 12 Dec 2023 at 23:43 UTC
Last updated: 12 Dec 2023 at 23:43 UTC
Bug fixes
New features
Unsupported

Other releases