Blog

Load custom entity programmatically in drupal 8

<p>In this case I created a custom entity called 'submenu'. In my custom module a used HOOK_LINK_ALTER to make the submenu (which contains a textfield) visible on hover. I used the code below to render my custom entity content:</p>

Blog

How to use views_embed_view() in drupal 8, 9 & 10 [solved]

In some cases you want to embed a view inside your custom module. The views_embed_view() function is the way to go. With this little snippet, you can render any view.

Blog

Make menu items expanded by default in drupal 8

With this simple snippet, menu items are saved as expanded when you save your node. In some cases, this is a necessary functionality.

Blog

How to create a custom image token in drupal 8

When using lazy loading of images, I encountered an important issue. Social sharing engines like Facebook can't read placeholder images. In this drupal 8 tutorial we'll fix this issue by creating a small custom module handling image tokens.

Blog

A pinterest-style lazy loading module for drupal

Ever looked at Pinterest or Google images and wondered how to achieve this nice effect of loading in images? One of the things that frustrated me building drupal websites is the lack of nice front-end libraries. Fancyload solves the problem!

Subscribe to