Drupal

Blog

Uri to image style url [drupal 8]

A much needed functionality is how you get the url of an image style form the uri (f.e. in a node object). This snippets helps you accomplish this.

Blog

How to save meta tags to your node programmatically

When importing content, it is really important you also think about meta tags on your import. Here's how to save them to nodes.

Blog

Send e-mail with managed file attachment in drupal 8

Sending files attached in e-mails is a necessary feature for a lot of applications. This snippet shows you how to attach a managed file f.e. an invoice to your custom e-mail.

Blog

Cache block per user in drupal 8

I'll share with you some code on how to cache blocks per user. The secret lies in using the right cache context on the build() function of your block.

Blog

Drupal 8 swiftmailer html template example

Here's a html e-mail template example for sending html e-mails.

Blog

Fix the "Entities exist of type x and need to be deleted before importing" drupal 8 error

Configuration management is great. But you'll encounter some difficulties at first when importing existing config to a new site. A typical error is the "Entities exist of type" error. Here's how to fix them.

Blog

Get single field value in drupal 8

getting entity field values programmatically is easy, but check this out.

Blog

Send email notifications to webmaster on certain events in drupal 8

Today I have a small helper module to share with you. A small pain in the ass is that the sending of e-mails requires a bit too much code. More specifically sometimes you would like to send simple alerts to webmasters. This helper module helps you with it.

Blog

How to send html emails with drupal 8 [SOLVED]

One of the biggest flaws in drupal is the disability to do something easy as sending html emails out-of-the-box. In drupal 8 it is already slightly better, but you would need to know some things.

Blog

How to get config entity value in drupal 8

Config entities are new in drupal 8. The differ a bit from content entities. Here a snippet on how to get the value of a field programmatically.

Subscribe to Drupal