The theme system

The responsibility of theming a given piece of data is spread out over the Drupal core, modules, and the themes themselves. So, as a module developer, it is important to know that both modules and themes can theme data or content.

In this book, we will focus on the aspects that happen at the module level. We will not concern ourselves with styling or layouts, but work primarily with theming definitions and templates that are needed within the module. Typically, it is the best practice to ensure that modules are able to theme their data. If done right, themes can then come into play and override that theming to change the presentation.

A major shift in Drupal 8 compared to older versions is the move to the open source Twig ...

Get Drupal 8 Module Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.