Extra Block Types (EBT) - New Layout Builder experience❗

Extra Block Types (EBT) - styled, customizable block types: Slideshows, Tabs, Cards, Accordions and many others. Built-in settings for background, DOM Box, javascript plugins. Experience the future of layout building today.

Demo EBT modules Download EBT modules

❗Extra Paragraph Types (EPT) - New Paragraphs experience

Extra Paragraph Types (EPT) - analogical paragraph based set of modules.

Demo EPT modules Download EPT modules

Scroll

Creating block in Drupal module programmatically

13/04/2025, by Ivan

Menu

Unlike in Drupal 7, creating multiple instances of a block to place on your site is a simple task in Drupal 8.

This tutorial will teach you how to programmatically add a block to the block layout interface, how to add an (administrative) configuration form to the block, and how to handle it. Finally, you’ll learn how to define and display default configuration values for the form.

Before starting this step-by-step guide, prepare your module skeleton as described in “Prepare the module skeleton.”

Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.