English post

Tous nos billets sur le thème English post

Apply a VAT rate on a product with Drupal Commerce 2

Drupal Commerce 2 now allows you to manage the various taxes and VAT to apply to an online store, regardless of its country and their respective rules in this area. Most of the contributed modules managing these elements on Commerce 1.x are therefore no longer necessary. Let's find out how to use the Drupal Commerce 2.x Resolver concept to set the VAT rate to apply to different products.

Set up workflows with State machine on Drupal 8

We saw in a previous post how to set up a publishing process on Drupal 8 with the modules Content moderation and Workflows. We will address here a similar problematic but relying this time on the module State machine, module that will allow us to set up one or more business workflow on any Drupal entity. Note that the state machine module is one of the essential components of Drupal Commerce 2.x. Let's take a closer look at how state machines work.

Change configuration directly on a Drupal 8 production site

Managing native configuration with Drupal 8 makes it very easy to make changes or additions to the configuration from a site instance (such as a development environment) to another site instance (the production environment). These configuration exports and imports of a site are made in one piece: that is, the entire configuration of a site, which is updated. Thus if configuration additions have been made to the production site, they will be overwritten at the next import of the configuration if these configurations are not present also on the source environment. But there are valid use cases where certain configurations can and must be modified directly in production. Examples of immediate use are, for example, the creation of new Webform forms, or the creation or update of new Newsletters managed with the SimpleNews module. It is quite legitimate for a webmaster to modify or create new NewsLetters on the production site. It's almost like content, except that ... it's a configuration entity. Let's discover how to manage these particular cases with the module Configuration split, module that will allow us to maintain an organized process to manage the evolution and maintenance of a site in production while allowing the modification of some configurations live.

Change the position of the meta data panel on the node form with Drupal 8

Content metadata (menu settings, publishing options, url path settings, and so on) are by default displayed on the node form in a side panel. This has the advantage of giving immediate visibility on these options while writing its content. But there are use cases where the lateral position of these informations is detrimental to the general ergonomics, because reducing the space available for the content form. This can be the case, for example, if you use the Field Group module to structure and group the information you need to enter. No need here for a Drupal expert. Let's find out how we can make the position of these metadata customizable according to the needs and general ergonomics of the Drupal 8 project.

Filter content by year with Views on Drupal 8

It is not uncommon to propose to filter contents according to dates, and in particular depending on the year. How to filter content from a view based on years from a date field? We have an immediate solution using the Search API module coupled with Facets. This last module allows us very easily to add a facet, to a view, based on a date field of our content type, and to choose the granularity (year, month, day) that we wish to expose to the visitors. But if you do not have these two modules for other reasons, it may be a shame to install them just for that. We can get to our ends pretty quickly with a native Views option, the contextual filter. Let's discover in a few images how to get there.

Integrate third-party media with URL embed on Drupal 8

You want to allow your content editors to easily retrieve and integrate media, images, videos, sounds, presentations from third-party platforms? The Media entity suite has an extra string to its bow with the URL embed module. This module uses the PHP Embed library, and allows you to simply retrieve from a url a media from a third-party platform like Twitter, YouTube, Instagram, SoundCloud, Spotify, Vimeo, Slideshare, etc. To mention only the best known. This module allows you to integrate a remote media within a text field or from a dedicated link field type. Let us discover how this module works, very simply besides.

The 13 mythical (or not) defects of Drupal 8

Having had the opportunity to read a recent comparative study between Drupal 8 and SPIP, I discovered a Drupal perception that is not mine. Far be it from me to want to compare Drupal and SPIP. Indeed, I know very badly SPIP, at least only as a basic user, and much less than Drupal, and so I will not venture on such a comparison. Also, I wanted to share these mythical, real or perceived defects of Drupal 8, which I recently discovered and which I think deserve a counterpoint.

Do I have to wait for Drupal 9 for my web project?

In a previous post, we saw the Drupal 8's new policies for versioning, support and maintenance for its minor and major versions. This policy has evolved somewhat since the last DrupalCon Baltimore conference in April 2017. And this evolution of Drupal's strategy deserves a little attention because it can bring new light to those who hesitate to migrate their site on Drupal 8. Or those who are wondering about the relevance of launching their web project on Drupal 8.

Create a mega menu with Drupal 8

Creating a responsive mega menu is often a regular prerequisite on any project, Drupal 8 or other. And if we can find some solutions offering to create mega menus easily, very often these solutions remain quite rigid and can hardly be adapted to the prerequisites of a project. But what is a mega menu? It is nothing more than a menu that contains a little more than a list of links (proposed by the menu system of Drupal 8), with specific links, text, images, call to actions, etc.