block_description_modifier
Auto-fill and hide the “Block description (info)” field for Custom Blocks used in Layout Builder and block forms. Keeps block labels consistent and reduces manual editor input.
Features
- Central configuration page listing all Custom Block types (block_content bundles).
- Layout Builder inline blocks support
- Configure selected block types for use as inline blocks.
- Automatically sets the inline block label/description based on a chosen strategy.
- Hides title-related inputs in the Layout Builder add/edit dialog (where applicable).
- Content block support (regular Custom Blocks)
- For configured block types, the module always hides “Block description (info)” on the block add/edit form.
- Automatically fills “Block description (info)” on save.
- Configurable fill strategies (extensible)
- String: a fixed text (up to 60 characters)
- Content block label: uses the Custom Block type label
Field: copies from a selected text field (normalized); falls back to “corrupted field” if the field is removed or empty
(The “Field” option is only shown when eligible text fields exist.)
Use cases
Reduce editorial overhead by removing the need to manually maintain block descriptions.
Keep block labels consistent across markets/components.
Improve maintainability of complex Layout Builder pages by enforcing predictable inline block labels.
Post-Installation
Enable the module and clear caches.
Go to the module’s configuration page under Administration » Configuration » Content authoring (exact location depends on your admin menu setup).
Configure:
- Selected inline blocks: choose block types used as Layout Builder inline blocks and set the fill strategy.
- Available blocks: configure how regular Custom Blocks should auto-fill “Block description (info)”.
- Create/edit blocks or Layout Builder pages to see:
- “Block description (info)” hidden where configured.
- “Block description (info)” automatically populated on save.
Additional Requirements
Drupal core 11.x
Uses core Custom Blocks (block_content) and integrates with core Layout Builder forms.
No external libraries or APIs are required.
Recommended modules/libraries
- Layout Builder (core) – recommended to benefit from inline block form behavior and auto-labeling in Layout Builder.
- Inline Entity Form (contrib, optional) – recommended if you edit referenced Custom Blocks in embedded subforms (nested editing).
- Admin Toolbar (contrib, optional) – improves navigation to the configuration page.