Drupal 8.x

Override head title set by Metatag module in Drupal 8

Once Drupal's metatag module controls the head title, it is not apparent how to override it programmatically with a custom module or controller, because the Metatag module adds additions to a title like a [site:name], or anything that is set be default in its global settings. The article shows an example of overriding the head title programmatically without modifying theme files.

Online quiz to evaluate Drupal 8 development skills

Are you a Drupal Developer? Check out my new Online test for Drupal Developers page on this site.
This quiz is useful for Drupal devs with preparing for the technical interviews, and in general, it helps to refresh the knowledge in Drupal 8 modules development.
It is free and has no registration required.
Interesting enough?
Try to pass this Drupal exam online and share your results with friends!

Send email with an attachment without using contrib modules in Drupal 8

This tutotial provides code example for sending emails with an attachment without using any contrib modules in Drupal 8. We show how to properly include files's content and mime headers into message body which will become an email with an attachment by using hook_mail() and drupal mail manager.

Place Google Adsense or html/js code snippets as extra rows into View results

When it comes to monetizing traffic on your websites, placing the Google Adsense code snippets has always been easy. Usually, the process is simple: the ad's code snippet has to be put into content block and then placed anywhere on site, or just hardcoded directly into site's templates.

However, if you have a list of posts built with a regular view and you want to periodically show some ad between them, the task requires some coding. As for me, it has always been a case, because I could not find any suitable simple Drupal module that would resolve this task.

So after all, in order to get rid of routine coding, I created a module called Views Row Insert.

How to create custom view fields programmatically: Unfiltered header area field and content field plugins

If you ever tried to add custom styles or custom javascript to Unfiltered text field in Drupal 8 view, you had probably noticed that the style/script tags are always stripped out. Here is the example of how to programmatically create the unfiltered view header area custom field and the unfiltered view content field plugins where you can use <style> or <script> tags.