Blog

Get view mode inside preprocess_node()

Little snippet to get the current view mode

Blog

How to use configuration as cacheable dependencies in drupal 8 & 9

Cacheable dependencies got introduced in drupal 8 and provides great power over your caching.

Blog

Enable partial word search in database search API drupal 8 & 9

I did not expect the setting would be here, so I thought I'd share it.

Blog

Count query results of entityQuery in drupal 8 or 9

A typical example of querying is getting the row count. This snippet shows you how.

Blog

Add a html5 number field in a drupal 8 or 9 form

The form API in core is great, but without contributed modules it lacks a bit of sweetness for html 5.

Blog

Add a html field to a form in drupal 8 & 9

The Form API changed a bit over the years. This is the way add a html field to a form in drupal 8 & 9.

Blog

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.

Blog

Get all vocabularies in drupal 8 & 9

This snippet works starting in drupal 8.8 and replaces older deprecated ones.

Blog

List all campaign url's witch Mailchimp API in PHP

This snippet will help you to list all campaign urls with Mailchimp API

Blog

Hide revision log field on a entity form

When using the node system we have a checkbox on the edit page to deactivate a log field. For custom entities we need to do it ourselves.

Subscribe to