Skip to main content
Home
Drupal life hacks

Main navigation

  • Drupal
  • React
  • WP
  • Contact
  • About
User account menu
  • Log in
By admin, 21 August, 2025

How and Why to Use --prefer-dist in Composer for Drupal Projects

Introduction:
When working on Drupal projects, installing and updating dependencies is a crucial step. All external modules and libraries are managed using Composer. The --prefer-dist option helps speed up this process and ensures more stable installations.


What --prefer-dist Does

Composer can fetch packages in two ways:

Tags

  • #Drupal Planet
  • Composer
By admin, 15 August, 2025

The Tale of the Retired Numbers in Drupal

The Tale of the Retired Numbers in Drupal

Once upon a time in the cozy world of Drupal, there lived three humble numbers: 0, 1, and 2.
They had an important job — helping developers set the preview mode for content types.

Tags

  • #Drupal Planet
By admin, 1 August, 2025

Why Laravel Doesn’t Make Me as Happy as Drupal: A Look at Web Route Definitions

When working with Laravel and Drupal, I noticed something striking: defining web routes feels vastly different between the two. Laravel offers what feels like an endless number of ways to register routes, while Drupal provides a single, standardized approach. Let me break this down.


1. How Laravel Defines Web Routes

In Laravel, routes for the web layer are typically defined in the routes/web.php file. But because of Laravel’s flexibility, there are many ways and places to register them:

Tags

  • #Drupal Planet
By admin, 19 July, 2025

What’s New in Drupal 11.3: YAML Content Export Built Into Core

New in Drupal 11: Export Content to YAML with the content:export Command

 

With the release of Drupal 11.3.0, a powerful new tool has landed in core: the content:export Drush command. This feature simplifies how developers generate YAML-formatted content for installation recipes, testing, and automation pipelines.

Tags

  • #Drupal Planet
By admin, 11 July, 2025

How to Integrate Google Cloud Storage with Drupal: Step-by-Step Guide

Modern websites often need scalable and reliable file storage solutions for images, videos, PDFs, and other assets. One of the best tools for this is Google Cloud Storage (GCS). In this article, we’ll show you how to integrate GCS with Drupal so that all your files are stored and served directly from Google’s cloud infrastructure.


Why Use Google Cloud Storage?

Google Cloud Storage offers:

Tags

  • #Drupal Planet
  • Google Cloud Platform
By admin, 4 July, 2025

Object-Oriented Form API in Drupal 11

✅ Disclaimer

This article summarizes exploratory ideas regarding an object-oriented approach to form/render arrays in Drupal.

⚠ Important Notes

  • This content is not an official description of Drupal 11 features.

  • The information presented here may:

Tags

  • #Drupal Planet
By admin, 28 June, 2025

Drupal Routing Explained: Passing ‘op’ Parameters to Controllers the Right Way

Your YAML defines two Drupal routes for enabling and disabling blocks, using the controller BlockController::performOperation with the operations enable and disable.

Here is a brief explanation:

By admin, 28 June, 2025

Drupal 11.2 Hook Migration Guide: Modernize Your Module’s Hooks with Attributes

🔄 Updating hook_help() When Migrating from Drupal 8 to Drupal 11.2

With the release of Drupal 11.2, developers are encouraged to modernize their codebase by replacing legacy hooks with more structured, object-oriented alternatives. One of the most commonly used hooks in legacy modules is hook_help() — the function that adds helpful module documentation to the /admin/help page.

Tags

  • #Drupal Planet
  • Hooks
By admin, 26 June, 2025

Drupal Theming and Layout: When to Use Paragraphs, Layout Builder, or Twig Templates

In Drupal, Paragraphs, Layout Builder, and custom templates are all tools for controlling how content is structured and displayed — but they serve different purposes and are used in different contexts. Here's a clear breakdown of each and when to use them:


✅ 1. Paragraphs

❓ What it is:

The Paragraphs module lets site builders define reusable, flexible content components (like “Image + Text”, “Slider”, “Video”, etc.) that editors can mix and match in a structured way within content types.

Tags

  • #Drupal Planet
By admin, 26 June, 2025

Why More Indexes in MySQL Aren't Always Better

🛑 When Indexing Can Hurt MySQL Performance

Indexes usually improve query performance, but in some cases, they can actually make things worse. Here are the key situations:

Tags

  • #Drupal Planet
  • MySQL

Pagination

  • First page
  • Previous page
  • …
  • Page 2
  • Page 3
  • Page 4
  • Page 5
  • Page 6
  • Page 7
  • Page 8
  • Page 9
  • Page 10
  • …
  • Next page
  • Last page
Powered by Drupal