Skip to main content
Redirect form after registration in drupal 8
Sometimes it is needed for a user to be redirected after registration. The user is not logged in yet, and has to go to a landing page with more instructions on verifying his e-mail.
about Redirect form after registration in drupal 8
Create forum topic programmatically in drupal 8
The forum module is a core module that was rewritten for drupal 8. In this snippet I show you how to create forum topics programmatically.
about Create forum topic programmatically in drupal 8
Clear specific cache in drupal 8
Drupal's default caching mechanism is to clear "all" cache. This is rather inefficiënt. There are options to clear specific caches only, here's how.
about Clear specific cache in drupal 8
A default .gitignore file for drupal 8
This example might help you setting up default installations.
about A default .gitignore file for drupal 8
Validate numeric url parameter for controller using regex in drupal 8
The routing system that drupal 8 offers is flexible in terms of validation. It is possible to validate your route against some typical regex lines.
about Validate numeric url parameter for controller using regex in drupal 8
Disable caching on a drupal 8 page controller
Caching in drupal 8 is quite nifty, here's a snippet on how to completely disable caching in your controller.
about Disable caching on a drupal 8 page controller
Caching in drupal 8 & 9 explained [video & code]
In this video I discuss block caching in drupal 8 & 9. It is quite radically different from drupal 7. I discuss cache tags, cache context and cache max-age.
about Caching in drupal 8 & 9 explained [video & code]
A lazy loading solution for drupal 8: Fancyload [video]
A few months ago I released a module that provides an out-of-the-box solution for lazy loading of images in drupal 8.
about A lazy loading solution for drupal 8: Fancyload [video]
Nid to url in twig [Drupal 8]
What if you have to link to a specific url in in twig, but you only have the nid? Moreover, it is good practice to use the id and not a hardcored url. Here's what you should use:
about Nid to url in twig [Drupal 8]
drupal 8: image field to image style programmatically
Helper snippet to render images with an image style in drupal 8
about drupal 8: image field to image style programmatically
Subscribe to Drupal 8
Follow me here