Blog

Fix disabled ckeditor fields in drupal 8 jquery modal

I recently had an issue with ckeditor inside pop-ups (modals) in drupal 8. This snippet is the solution to it.

Blog

Set field text format programmatically in Drupal 8

I recently found out a bug I wasn't aware of. My default text format wasn't saved on a body field. I attached a snippet to fix this.

Blog

Get a list of translated taxonomy terms in Drupal 8

I've had some difficulties loading a list of translated terms. More in particular I didn't want to show the untranslated terms, but ONLY the ones that were already translated in the current language

Blog

Redirect custom form and pass variable in drupal 8

A snippet with submitForm to redirect your form to another page and pass a variable.

Blog

Render a list of taxonomy terms in Drupal 8

With this snippet, you will be able to render a list of tags in drupal 8.

Blog

[solved] Drupal 8 Menu block not updated after saving new page

<p>I got this issue on a project I worked on. One answer: enable BigPipe module to fix this.</p>

Blog

Drupal 8 user registration form: show role options and hide administrator rol

By default, users with the permission of 'administer users' cannot assign roles on the user registration form. With this snippet you can, but make sure to hide the 'administrator'-role for your users.

Blog

Twig snippet to hide region if empty in drupal 8

I encountered this bug in a Display suite 2-column lay-out where I wanted the left region to disappear when empty. 

Blog

Redirect drupal 8 search form to custom result page

If you like to use the search api or a custom Views page for your search result I personally like to use the default search block and redirect it to my results page.

Blog

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. 

Subscribe to