Planet Blog

You can consult all our french post about Drupal by following this link.

Starting a migration with Migrate programmatically

Migrate, a module integrated into the Drupal 8 Core, is a powerful solution for setting up data import processes from any data source (CSV, XML, Database, JSON, etc.) to a Drupal 8 project. The purpose of this post is not to explore all the facets of Migrate, as they are numerous and are already covered in many blog posts or official documentation, but rather to address a particular point: how to programmatically launch a migration?

Export content to CSV with Drupal 8

The need to export the contents of a Drupal 8 project is a recurring need, whether for analysis purposes or for mass updating with a concomitant import process. We have several solutions with Drupal 8, each of which has advantages and disadvantages, whether in terms of the content types that can be exported, the options for exporting column headers and values, the level of access rights required and the highly variable configuration options. We will present here a new Entity Export CSV module that seems to be able to respond to many use cases.

Easily reorder nested paragraphs with Drupal 8

The Paragraph module allows, among other uses, to propose various and varied structured layouts according to the needs of a project, directly accessible and manageable by a content editor, without any particular administration rights. One of the major drawbacks I have encountered with Paragraph, for the design of complex landing pages, is the impossibility to change the parent of a paragraph in the case of nested paragraphs. As a user of the Paragraph module for many years, I may not have read all the release notes of the module. And that's probably why I'm only now discovering that the Paragraph module now natively offers a drag and drop function that allows you to completely reorder the layout of paragraphs, whether or not they are nested in other paragraphs.

Add a relationship to a View programmatically with Drupal 8

To make queries and build listing pages on Drupal 8, or any other content to collect, we have EntityQuery, the API Database (see Make a SQL query on multiple tables with Drupal 8) or the Views module which provides us an extremely powerful requester and graphical interface. Each of these methods has its advantages and disadvantages and may be more appropriate in certain situations (complexity of the request, etc.).

Invalidate the page cache according to a duration with Drupal 8

For some purposes it may be necessary to have content, or content elements, that may vary according to a certain time period, and therefore require a cache invalidation according to a certain duration. This is for example the typical case of a list of future and/or past events, which must invariably change over time.

Drupal 8 has three cache systems:

Receive an activity log by email with the Drupal 8 Entity Activity module

In a previous post I had the opportunity to present the Entity Activity module which allows us to set up a notification system on any type of Drupal 8 content entity, according to the three main actions of their life cycle: creation, update and deletion. Since beta version 8, the Entity Activity module includes a sub-module, Entity Activity Mail, which now allows us to send by email a summary of the notifications generated for each user, according to a frequency that can be configured by each user. Let's discover this new feature.

Set up a notification system on Drupal 8

For many Drupal 8 projects that have minimal interaction with their users, the need to set up a notification system quickly comes to the forefront. Being notified of a new comment, a response to a comment, a new publication on a particular subject, or a user, are recurring needs. To satisfy this type of need, we are going to talk here about a new module Entity Activity whose sole purpose is to log all types of actions performed, by users, according to their subscriptions, on a project. The Entity Activity module will allow us to generate any type of message, on any type of content entity on the tree main operations of the content life cycle: its creation, its update and its deletion.