When creating a listing page, it’s often necessary to offer users the ability to sort items by popularity based on the number of views of each page. This helps highlight content that is more likely to interest them. To achieve this, Drupal offers the Statistics module, which is currently included in core. This module allows you to store the number of daily views on a node, as well as views sinc...
Articles
By default, the visibility conditions of Drupal blocks on Content Types allow you to choose on which content types a block is displayed, and therefore reciprocally those on which they are not displayed. Even though this behavior seems quite logical at first glance, it only allows you to filter content types and not pages generated from programmatic routes (those from views for example). It then...
The Easy Breadcrumb module is one of Drupal's most popular breadcrumbs building module. When using it on a multilingual website, I stumbled upon an issue where I wasn't able to translate the home page crumb title segment (typically Home) in other languages. An issue exists that was marked as Fixed but it doesn't seem to work in my case when using Drupal 10.3.1. To solve this issue, I created a ...
diff --git a/src/EasyBreadcrumbBuilder.php b/src/EasyBreadcrumbBuilder.php
index 7790b32..15bedc7 100644
--- a/src/EasyBreadcrumbBuilder.php
+++ b/src/EasyBreadcrumbBuilder.php
@@ -339,7 +339,7...
While Drupal ships a default language switcher block, its options are very limited by default and are not easily customizable without using hooks or complicated template overrides. To solve this problem, the Language Switcher Extended module has been created. Thanks to this module, some new options are available through its config tab once it its installed on your site. It is a common need to w...
For SEO, the title of a page can be one of the elements to optimize in order to target certain requests or simply to give more information to search engines about the content present on a page. For this site, I created a Technologies taxonomy in order to communicate range of services that I offer to potential prospects. These technologies are referenced everywhere else on the site, so it made s...
<h1>{{ content.field_technology_title }}</h1>
Since the integration of pipeline building tools into major git repository hosting services (GitHub Actions for GitHub, GitLab CI/CD for GitLab), there is no longer any excuse to continue manual deployment via FTP. Personally more invested in the GitHub ecosystem than that of GitLab, I use GitHub Actions for the majority of my deployments with a pipeline that I have refined over the years. This...
name: Build and deploy
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
When deploying a Drupal project with a continuous deployment pipeline, it is often necessary to rebuild the Drupal cache so that it takes into account the latest file changes. Problem: While rebuilding the cache ensures that you have the latest server-side changes, it can cause additional slowness when loading pages for the first time while Drupal rebuilds the HTML cache of the various pages, v...
- name: Warm cache
run: ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_HOST }} "cd /var/www/html && vendor/bin/drush warmer:enqueue entity,sitemap && vendor/bin/drush queue-run warmer"
https://www.drupal.org/project/gin/issues/3219020
diff --git a/src/GinContentFormHelper.php b/src/GinContentFormHelper.php
index 8e39cd0..3b6b262 100644
--- a/src/GinContentFormHelper.php
+++ b/src/GinContentFormHelper.php
@@ -164,7 +164,7 @@ ...