? Developing a Drupal 8 module with a controller and custom template

Feb 07, 2018

In this tutorial, we are going to create a simple Drupal 8 module. We will declare the module in the .info.yml file first, then we will declare the custom theme function that will link the controller and the template file. Afterward, we will declare our controller in its own class and then we will assign it to a root in the .routing.yml file. In the end, we will implement our template file.

The full code of the module you may find here:

If you liked this video, please also have a look at my new corse about Drupal 8 module development here (with 50% discount):

Hi! I'm Karim Boudjema, the developer and site-builder of this site.

I was wondering how could I giving back to the Drupal community all what it gave to me during the last 10 years, that's how the idea of this site came to me ... (read more)

Hi! I’m Santiago Rico, the web designer and themer of this site.

When Karim proposed me to design and theme this site for the Drupal community, I accepted immediately because the community is the main reason why I love Drupal so much.