Quantcast
Channel: programming
Viewing all articles
Browse latest Browse all 111

Drupal 8: How to write a simple custom “block module”

$
0
0
Drupal 8: How to write a simple custom “block module”alvinJune 21, 2016 - 8:25pm
Table of Contents1 - Goals2 - Backup your database3 - Check my code out of Github, or create a module directory4 - Create a project info YAML file5 - Create the necessary subdirectories6 - Write the code to display your block7 - Clear the caches8 - Enable the module9 - Place the block module10 - See the custom block on your website11 - The biggest problem I encountered12 - The source code13 - Summary

In this tutorial I’ll demonstrate how to write a simple Drupal 8“block module.” By this I mean that I’ll show you how to write a simple Drupal 8 module that will display output in a block. When you’re done you will have created a new block that you can place in one or more theme regions.


Viewing all articles
Browse latest Browse all 111

Trending Articles