Skip to main content
Menu
Offcanvas
Illustration blog

Drupal Blog

Drupal is a powerful and easily editable content management system (CMS) that allows users to create and manage content on one or more websites.  It is open source and used by millions of people and organizations. It benefits from a very large community of developers and users. Discover on this blog articles on Drupal modules, tips and code to optimize and add features to Drupal.

Ajouter une meta description à une seule route générée par un module Drupal.

If you are creating a route with a Drupal module, you may need to add a meta description to this page. You can use the hook_page_attachments() hook

read more

How to remove validation errors with a back button on a Drupal multistep form?

If you create a form in Ajax and multistep, you may encounter a problem with the return button to the previous step which will cause a validation problem.

read more

Integrate a Popin on your Drupal site

You may sometimes need to display a popin to announce an event, important information for users or offer a registration form as soon as a web page opens.

read more

How to get a twig template suggestion for a custom block?

By default, Drupal does not have a twig template suggestion for custom block types. You can use a hook to get a suggestion easily.

read more

How to improve the ergonomics of the Paragraph module in the back office?

The paragraph module improves content management on Drupal. By default, the display of paragraphs can cause ergonomic problems (very long editing page, no overview of paragraphs, difficulty in ordering, etc.). Here is a solution to improve the presentation of paragraphs.

read more

How to create role-specific registration pages?

The Multiple Registration module allows the use of different registration forms depending on the roles.

read more

How not to display content on its own page (full view mode)?

You may have a content type that should never be displayed on its own page, such as an image content type displayed in a carousel. Rabbit Hole can prevent this node from being accessible on its own page, via node/xxx.

read more

How to create custom permissions on Drupal?

We may need to create permissions that do not exist natively on Drupal or that are not precise enough. For example, Drupal will offer a permission that includes several features when we want to offer only one. The custom permissions module allows you to precisely manage permissions.

read more

Ultimate Cron

Drupal has a native CRON system but it does not allow you to manage CRON tasks individually or by group. The Ultimate Cron module allows running a CRON job or group of jobs at different times.

read more

Rename "web" public folder to htdocs, public_html or other

The folder that contains the site is named web. It may happen that we are asked to rename it. Here's how to do for example if this folder needs to be renamed to htdocs.

read more

How to hook a paragraph form

Find out how to hook a form from the paragraph module in the BO or on the front to add classes, a placeholder, etc. The method is identical to the hooks for Form API forms but the hook is specific to this module.

read more

How to remove all terms from a taxonomy

You may need to delete all the terms of a taxonomy, either to replace them with a new list of terms, or under development to redo an import.

read more

How to assign a role automatically when creating a user?

We may need to assign a role automatically to users who register on a Drupal site. This avoids having to do it in the admin if the account needs to be validated and it allows users to have the right role if the account is activated automatically.

read more

How to delete local changes with git that you haven't committed ?

To remove local changes with git that you haven't committed, you can use the git checkout command. This command allows you to revert to a previous version of your working directory.

read more