Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Block Content Machine Name

Security covered Under active development 226 sites

This module adds a machine name field to block content entities, enabling specific templating for individual blocks. It provides template suggestions like `block--block-content--[MACHINE_NAME].html.twig`, allowing you to reuse templates across different block content items.

Block content machine name adds machine_name field for block_content block content type. Which is used to define the specific block template for that specific block.

Module can be very helpful for theming if you are using block_field module to place block content in entity.

New Projects: read me !!

We have removed the machine_name field from the form, check this link:
#2685749: Add a 'machine_name' widget for string field types with a UniqueField constraint
With the latest update of module, we will use the info value as a machine name.

After successful installation module will provide additional template suggestion for FE.
- block--block-content--[MACHINE_NAME].html.twig

I.E. If you have block_content created for copyright block. Then You will have template suggestions as listed below.

- block--block-content--copyright.html.twig
- block-content--copyright
- block-type-block-content

You can now add template suggestion in block content while creating it. With this feature you can use the same template again and again for various block contents.

Drupal 8–11

Ask your assistant about Block Content Machine Name

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • block_content Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Nov 2023
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
3.0.4 Stable 8–11 Sep 4, 2026
3.0.3 Stable 8–10 Nov 20, 2023