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.
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.
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.
This example might help you setting up default installations.
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.
Caching in drupal 8 is quite nifty, here's a snippet on how to completely disable caching in your controller.
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.
A few months ago I released a module that provides an out-of-the-box solution for lazy loading of images in 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: