How to upgrade from Drupal 8 to 9 with composer [blog post + screen cast]

This blogposts gives you a summary on how to upgrade to drupal 9 and fix all composer issues.

How to programmatically update an entity reference field in drupal 8

Drupal 8 is becoming more and more API-first based. This means a lot of imports and exports of data will be done. A thing you might face here, is that the updating of entity reference fields is a bit tricky. Here I'll show you how it is done.

Create paragraphs and attach to node programmatically in drupal 8

Paragraphs give great power to drupal 8. This code will show you how you can add them programmatically, for example when importing stuff.

Disable block caching in drupal 8

When creating custom blocks, sometimes you need to make sure the block is never cached f.e. when including dynamic links. 

How to use bundle classes in drupal 9 & 10

Bundle classes have arrived! In my opinion a major change to drupal and the way we will do theming. Introduced in branch 9.3.x.

How to render button with class from Route in drupal 8, 9, 10

With the following snippet you can create a link or button with classes from a route.

Five ways of using the path twig function for route links in drupal 8, 9 or 10

Linking to routes in Twig has become much easier since the release of some updates in Drupal 8. Here are 5 snippets that help when linking to internal routes.

How to use entityQuery Exists condition with entity reference

This snippet returns TRUE or FALSE if an entity has a filled-in value on a entity reference on field_winner field.

Subscribe to Drupal