Skip to main content
ComputerMinds

Articles

Custom code

PhpStorm coding tip for Drupal services

Here's a super simple tip to help you work with services for Drupal in PhpStorm (our favourite IDE). First, ensure you have enabled the Drupal Symfony Bridge and Symfony Support plugins; they're brilliant for auto-complete suggestions, and navigating around services,…Read article →

Context-aware blocks

Defining your own Drupal block plugins in custom code is really powerful, but sometimes you can feel limited by what those blocks have access to. Your block class is like a blank canvas that you know you'll be pulling data into, but how should you get that data from the…Read article →

Making product images consistent with image styles

We’ve recently given the dimplex.co.uk site a new face lift and stumbled across an interesting problem during development when it came to implementing the new product carousel on their product pages, more specifically, the handling of the images themselves.Read article →

Custom AJAX loading icon

There's nothing like Drupal's stock AJAX spinner (this: ) to make you notice that a site's design hasn't been fully customised. The code from my previous article showing how to fetch a link over AJAX to open in a Foundation reveal popup would suffer from this without some…Read article →

Help Drupal help your configuration

TL;DR: Define a schema for any bespoke configuration, it's not too hard. It's needed to make it translatable, but Drupal 8 will also validate your config against it so it's still handy on non-translatable sites. As a schema ensures your configuration is valid, your code, or…Read article →