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.
❗Extra Paragraph Types (EPT) - New Paragraphs experience
Extra Paragraph Types (EPT) - analogical paragraph based set of modules.
Scroll
Drupal 8 Create page programmatically
22/02/2025, by Anonymous (not verified)
Forums
- Log in to post comments
Routing YAML file for the Example module
The routing information is stored in
example/example.routing.yml
:module_name.sub_name
. When other parts of the code need to refer to the route, they will use the machine name./
).Page implementation for the Example module
The Controller class
ExampleController
should be defined inexample/src/Controller/ExampleController.php
:\Drupal\example\Controller\ExampleController
, it should look for the filemodules/example/src/Controller/ExampleController.php
.ControllerBase
instead of the fully qualified name. This makes ourclass
line much easier to read.Drupal API documentation:
https://www.drupal.org/docs/8/creating-custom-modules/create-a-custom-page