Skip to main content
ComputerMinds

Articles · Page 5

Drupal Planet

Drupal with Composer on Apache on Bash on Windows 10!

I've recently been playing around on Windows 10's new Bash on Ubuntu feature, which provides a native bash linux shell for Windows. I thought I'd try and get a Drupal 8 site running, via composer, served from Apache, without any need for a virtual machine in Windows. Kristian…Read article →

Drupal 8 Views: How to set as admin path

In Drupal 8 admin paths are now defined as part of route definitions so are no longer defined in hook_admin_paths(). In many cases, uniting routing with admin path definition makes things easier - simply add _admin_route: TRUE in a .routing.yml file, but not when it comes to…Read article →

Drupal 8 Views: How to formulate the route name

This article will explain how to formulate the route name for a view because there are very few sources for the information online.Read article →

Question: When should I define a service?

We've been getting stuck into Drupal 8 development and have been grappling with the concepts of services, dependency injection and containers.Read article →

Dependency Injection - how to access services in controllers

If you are trying to get to grips with Dependency Injection in Drupal 8 then here is a walk-through of how I applied it in one of my Drupal 8 test projects.Read article →

Drupal 8 Config Management - how should I add config to a D8 site?

For me this is the biggest unanswered question hanging over my development of Drupal 8 websites:Read article →

Drupal 8 Namespaces - class aliasing

Class Aliasing is the simple, but very useful solution to the problem of needing two classes (from different namespaces) with the same name.Read article →

How to write a PHPUnit functional test for Drupal 8

This article will talk you through the steps to follow to write a simple PHPUnit functional (Kernel) test for Drupal 8.Read article →

Drupal 8 Event Subscribers - the successor to alter hooks

In Drupal 7 if you wanted to tweak the functionality of an existing function then an alter hook was your best friend, but in Drupal 8 it's "all change!"Read article →

Making an accurate, responsive node preview for Drupal 7

It's a well known fact that a large proportion of sites turn off the node preview button. It just doesn't work well. Your unsaved changes don't show and the admin theme is used in place of your site theme - not helpful.Read article →

Language lessons: How can I fix my autocomplete box?

Languages make everything so complicated! I just discovered the autocomplete bit on my reference fields wasn't working - until I tried searching by another language, and then the results gave me a surprise:Read article →

Language Hierarchy: More power and flexibility without extra effort

Several of our recent projects have involved setting up languages that feel like 'child' languages of other languages, for a variety of reasons. Sometimes it's for marketing, so that content can be overridden for markets using a specific currency, other times it's to target a…Read article →

Saving the web with responsible websites

TL;DR: If the internet reflects society, what does your content say about you? Having flexible and accessible content will allow you to adapt to how people consume your content.Read article →

Building site content, paragraph by paragraph

We've done a fair bit of reading around lately, thinking through different ideals on content construction. There's a fine balance to be struck between atomic units of content, vs. an enormous amorphous blob of formatted HTML, and articles like this by Wim Leers and sessions…Read article →

Mobile first, later : 10 Steps for retrospectively making your Drupal site responsive

On April 21st, Google updated their mobile search algorithms to boost the rankings of mobile-friendly web pages, whilst conversely decreasing rankings for pages that have been designed only for large screens. This change is likely to have a big impact on many Drupal sites, and…Read article →

Drupal Queues

Queues are a wonderful way of separating different parts of a system. Once you have separated those parts you can do lots of interesting things, like be more fault tolerant or have a more responsive front end for your users.Read article →

Language lessons: 10 Useful tips

To complete my series on multilingual Drupal, here are some mini-lessons I've learnt. Some of them are are to improve the experience for administrators & translators, others cover obscure corners of code.Read article →

Contribute to Drupal(.org)!

So at DrupalCon Austin I had a great time at the contribution sprints. I worked on some issues affecting Drupal.org, it was great fun!Read article →

Language lessons: What are you translating?

It seems an obvious question to ask, but what are you translating?Read article →

Language lessons: Default language

When you are going to have multiple language set up on your Drupal site, it's important to set the default language appropriately before creating content. Once that is set, content will normally be set to be in that language, and any translations made on the site will be…Read article →

Language lessons: Think first!

Architecture has to be carefully thought through before implemented, or it could all come crashing down at an unexpected moment. You may not realise it, but language is a piece of architecture in all websites. Site builders will be used to thinking about how best to model…Read article →

Language lessons: Getting started

I recently got the chance to implement Drupal's multilingual capabilities on a major client site. Drupal has some of the best functionality around for localizing & translating a site, but it does take quite a lot to understand & configure. We will host a series of articles on…Read article →

Where is my content coming from?

I was asked at Drupalcamp London how to identify where parts of a panel come from. Whether you need to change something on a site you inherited, are looking to trace your steps back on something you created long ago, or need to understand how to fix a colleague's mistake, it…Read article →

Drupal 8: Creating a custom field - Part 3: Field formatter

This is part 3 in my series of articles about creating a custom field. I recommend reading Part 1: Field type and Part 2: Field widget first, if you have not done so already.Read article →