The Savvy Few: Twig templates for custom block types in Drupal
Similar to content types, Drupal offers the ability to create custom block types. Here’s how to enable custom Twig templates for each of your custom block types.
Read moreThe Savvy Few: How to redirect a user after login in Drupal the proper way
Automatically redirecting a user after logging into your Drupal website is a common requirement. In Drupal 7, you would probably have used hook_user_login() to perform this task, but with Drupal 8 came a more robust way to handle this. Our…
Read moreThe Savvy Few: Accessing the current node ID in Drupal
From time to time you just need the node ID of the current node to get things done. In Drupal 7 you simply used the arg() function to do this, this approach no longer works for Drupal 8 and onwards because arg() is deprecated.
Read moreThe Savvy Few: How to get a Drupal image style URL from a media field in a twig template
There’s plenty of information on how to render a raw field value in a twig template, how to obtain the url form an image - even from a media field. The image style url from a media field however, can be quite tricky. Here’s how to do it.
Read moreThe Savvy Few: How to fix "The provided host name is not valid for this server" in Drupal
Most Drupal developers have come across this problem at least once. You are running a basic Drupal website, but somehow it only shows a plain white screen with “The provided host name is not valid for this server" on it. Here’s what it means and how to fix it.
Read moreThe Savvy Few: Upgrade to Drupal 9 - It’s easier than you think
Drupal 9 was released on June 3rd, 2020. It marks a major milestone in the history of the world’s number one enterprise open source CMS. Although any major version update may sound like a risky undertaking, upgrading from Drupal 8 to 9 is a walk in the park. Here’s why.
The Savvy Few: How to customize the language switcher in Drupal 8
Drupal 8 dramatically improved the capabilities for creating multilingual websites. Content translation was moved into core and an improved architecture made internationalization of complex sites much easier. The language switcher however, could do with some…
Read moreThe Savvy Few: It’s 2020, migrate from Drupal 7 to Drupal 8 and get Drupal 9 for free!
On February 25th 2019 the Drupal Association announced that Drupal 7 will be officially supported until November 2021, after which Drupal 7 will be marked “End of Life”. Since Drupal 7 was released in November 2011, reaching “End of Life” in…
Read moreThe Savvy Few: File uploads to your Drupal site, scan for viruses!
Drupal is known to be a secure CMS. Drupal also provides much flexibility when it comes to providing a highly interactive user experience. Often this means allowing users to upload files of various types to your website, to provide a resumé for instance when reacting to a job…
Read more