Blog
The standard configuration of the block visibility page in Drupal 8 allows you to include numbered paths (via "Show for all numbered pages" or exclude numbered paths (via "Hide for all numbered pages"), but you can never include and exclude at the same time, the "Block Exclude Pages" module offers...
The migration system in Drupal 8 is very powerful. In very few lines of code, you can connect various data sources, process and import data into Drupal. One of those important data is URL transfer and redirects for legacy content. The good news is that redirects are entities in Drupal...
Today I want to introduce a new contrib module called Composite Reference. Why is it called this way? Because it is intended to be used to strengthen the "link" between entities that are meant to live and die together. In many cases, we use entity references to entities that are...
Hi, I recently came across a peculiar use case: i had to create a logic where the URL alias changes when selecting a particular taxonomy term referenced in a particular content type. Let's say for simplicity, that we have two types of URLs depending on the two possible taxonomies: Taxonomy...
When creating a Drupal 8 or 9 project using the drupal/recommended-project composer template, you may notice during certain Composer commands that the scaffolding files are copied from an "assets" directory inside the Drupal core directory to their correct place in the codebase. But did you know that the plugin that...
Drupal 8 dramatically improved the capabilities for creating multilingual websites. The content translation was moved to the core and an improved architecture made it much easier to internationalize complex sites. However, the language switcher could use some improvements. Here's how we customized it. As a digital agency with Catalan origins...
With the global crisis establishing digital transformation as an inevitable strategy, many companies are now being forced to digitize their operations, or suddenly need to dedicate everything they have to streamline their digital transformation. Because of all this, we are also seeing an increasing demand for services provided by digital...
As ever-evolving Drupal developers, we've been in the process of moving towards a Composer-based workflow for managing our Drupal project code bases. While it is (usually) an easy leap to move from "drush dl" to "composer require" for Drupal contributed modules and themes, there is another significant opportunity for us...
In news that nobody expected (I don't know if anyone expects this news or not) it turns out that Drupal 7 will continue to be supported in security updates for one more year, until 2022. What is the reason? Apparently to give more time to those who have Drupal 7...
Doing this for a particular order is pretty straightforward. All you need to have is the ID of the coupon code: // This is the ID of the coupon code you want to add to the order. $coupon_id = 1; /** @var \Drupal\commerce_order\Entity\OrderInterface $order */ $order = \Drupal\commerce_order\Entity\Order::load(1); $order->get('coupons')->appendItem($coupon_id); $order->save()...
Have Any Project in Mind?
If you want to automate your business or do something with Drupal, let's talk.
AI automation, consulting, development or Drupal website maintenance.