Book Image

Drupal 10 Masterclass

By : Adam Bergstein
Book Image

Drupal 10 Masterclass

By: Adam Bergstein

Overview of this book

Learning Drupal can be challenging because of its robust, extensible, and powerful capability for digital experiences, making it difficult for beginners to grasp and use it for application development. If you’re looking to break into Drupal with hands-on knowledge, this Drupal 10 Masterclass is for you. With this book, you’ll gain a thorough knowledge of Drupal by understanding its core concepts, including its technical architecture, frontend, backend, framework, and latest features. Equipped with foundational knowledge, you’ll bootstrap and install your first project with expert guidance on maintaining Drupal applications. Progressively, you’ll build applications using Drupal’s core features such as content structures, multilingual support, users, roles, Views, search, and digital assets. You’ll discover techniques for developing modules and themes and harness Drupal’s robust content management through layout builder, blocks, and content workflows. The book familiarizes you with prominent tools such as Git, Drush, and Composer for code deployments and DevOps practices for Drupal application management. You’ll also explore advanced use cases for content migration and multisite implementation, extending your application’s capabilities. By the end of this book, you’ll not only have learned how to build a successful Drupal application but may also find yourself contributing to the Drupal community.
Table of Contents (31 chapters)
1
Part 1:Foundational Concepts
7
Part 2:Setting up - Installing and Maintaining
10
Part 3:Building - Features and Configuration
12
Chapter 9: Users, Roles, and Permissions
17
Part 4:Using - Content Management
21
Part 5:Advanced Topics
Appendix A - Drupal Terminology

Basic Drupal concepts

Drupal’s core delivers two fundamental parts of the application: a frontend web application and a backend administrative system. Both are delivered through the Drupal application, which can be accessed from a web browser differentiated based on the request. Common backend paths, such as the user login page “user” and administrative console “admin,” help Drupal differentiate requests.

Drupal’s administrative backend

Conceptually, Drupal’s backend performs tasks and retrieves information about the Drupal system. Tasks change based on the access granted to the user. However, common tasks include performing content updates, configuring Drupal system settings, and managing modules. Useful information, such as Drupal’s system status page, access to Drupal logs, and help pages, can also be accessed from Drupal’s backend. It is useful for content editors and those managing the Drupal system.

The following figure demonstrates Drupal’s administrative backend, which can be found at /admin after logging in:

Figure 1.1 – Drupal’s administrative home page

Figure 1.1 – Drupal’s administrative home page

At the top, Drupal has an administrative menu that helps navigate the entirety of Drupal’s administrative backend. This figure demonstrates the initial, primary administrative page that lists links within Drupal’s backend. Each category has a gray background that represents a core feature or subsystem. Under each category are links to pages that perform administrative actions or configure the behavior of that subsystem.

Drupal’s frontend presentation layer

Since the backend configures Drupal and manages content, the frontend is responsible for serving content. Drupal’s render subsystem is used to correlate a page request to the corresponding response, which is dynamically returned by Drupal. While there is far more complexity, a high-level request flow interprets the path, gathers the relevant structured content from Drupal’s backend, maps the content to HTML templates found in the enabled Drupal theme, and returns rendered markup.

The following figure shows Drupal 10’s default home page rendered by the frontend presentation layer:

Figure 1.2 – Drupal’s default home page

Figure 1.2 – Drupal’s default home page

While this shows simple, basic placeholder content, it differs drastically from Figure 1.1, given that it is presenting content and not configuring Drupal.

Consider authenticated users while using Drupal’s frontend and backend. Drupal can deliver content, but not just for anonymous visitors who visit a Drupal website. During frontend processing, Drupal can render content specific for the user who’s being authenticated. Such a capability allows you to leverage Drupal features to build dashboards with individualized content, create personalized experiences, and even deliver content moderation workflows that pair with Drupal’s frontend. The most common use case for authenticated users is still accessing and using the administrative backend of Drupal, but a user can be configured without permission to access the backend. Given users have an expanded role in Drupal, a user can log into Drupal with no backend access and get content that’s specific and relevant to them. Imagine building a social network where every user only sees content they subscribe to. Drupal can do that.