Drupal is a registered trademark of Dries Buytaert
Release: Drupal 10.3.6 Update released for Drupal core (10.3.6)! Release: Drupal 11.0.5 Update released for Drupal core (11.0.5)! Release: Drupal 10.2.9 Update released for Drupal core (10.2.9)! Release: Drupal 10.2.10 Update released for Drupal core (10.2.10)! Release: Drupal 10.3.7 Update released for Drupal core (10.3.7)! Release: Drupal 11.0.6 Update released for Drupal core (11.0.6)! Release: Drupal 10.3.8 Update released for Drupal core (10.3.8)! Release: Drupal 11.0.7 Update released for Drupal core (11.0.7)! Module Revived: Translation Management Tool 8.x-1.19 Module tmgmt updated after 7 months of inactivity (8.x-1.19). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.

Some websites might contain elements that are considered content by the Drupal CMS while they might not only be used as content. For example custom blocks might be used for a footer that is shared between all environments. Structure sync tries to give you a tool to get around this issue by allowing you to synchronize taxonomy terms, menu links and custom blocks through the configuration.

The module will prevent you from having to create content multiple times and also decrease the risk of some elements being out of sync between environments, the main menu for example. It will also synchronize the UUIDs for these items to prevent you from having to change references to this in other configuration files. Finally, you have the ability to do a partial export or import so some of these elements can still be considered environment-specific content.

Structure sync provides Drush commands and admin interface screens for synchronizing content that could also be considered configuration. Including menu items, custom blocks and taxonomy terms.

Drush commands

The available Drush commands are:

  • export-taxonomies (et) - Export taxonomy terms to configuration
  • import-taxonomies (it) - Import taxonomy terms from configuration
  • export-blocks (eb) - Export custom blocks to configuration
  • import-blocks (ib) - Import custom blocks from configuration
  • export-menus (em) - Export menu links to configuration
  • import-menus (im) - Import menu links from configuration
  • export-all (ea) - Export taxonomy terms, custom blocks and menu links to configuration
  • import-all (ia) - Import taxonomy terms, custom blocks and menu links from configuration

The access to the admin screens is restricted with the permission to 'administer site configuration'.

Import types

Documentation contributed by willthemoor

Safe

Function to import blocks safely (only adding what isn't already there).

  1. Imports all custom blocks in config unless they already exist the current instance.
  2. Note: If a block was updated and exported to config in a different environment and that block already exists locally, you will not get the updated block content/config.

Full

Function to fully import the custom blocks.
Basically a safe import with update actions for already existing custom blocks.

  1. Deletes any custom blocks not in config.
  2. Imports all custom blocks in config.

Force

Function to import (create) all custom blocks that need to be imported.

  1. Deletes all custom blocks in the system (no checking first).
  2. Creates N new custom blocks based on the config.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Oct 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
2.0.8 Stable Oct 10, 2024