RSS feed

Nicer date ranges in Drupal – part 2

This is the second part of a series on improving the way date ranges are presented in Drupal, by creating a field formatter that can omit the day, month or year where appropriate, displaying the date ranges in a nicer, more compact form, e.g.:

This post covers some of the work to make the format customisable, and sutable for release as a contributed module:

Read more

Nicer date ranges in Drupal – part 1

A while ago I wanted to present events with a date range on a Drupal 7 site. Drupal's contributed date module provided a way to store the data, but the display wasn't to my liking, always showing the complete start and end date.

Wouldn't it be nice to show the dates in a more compact fashion, by not repeating the day, month or year where they aren't necessary? Like this:

There didn't seem to be a contributed module available, so I wrote some bespoke code for the project. It only supports one particular UK-specific date format, and there's no support for different languages.

Over the last few days, I've spent some time porting it to Drupal 8 and improving it, suitable for release as a new contributed module.

I thought I'd write about this process in the form of a tutorial over a few posts. I hope you'll find it useful.

Read more

DrupalCamp London 2017 - Sunday

This weekend I’ve been at the fifth DrupalCamp London - a gathering of 500 or so designers, developers and business owners using Drupal.

I blogged previously about the CxO day on Friday and day 2 on Saturday. Today was the final day!

Read more

DrupalCamp London 2017 - Saturday

This weekend I’ve been at the fifth DrupalCamp London - a gathering of 500 or so designers, developers and business owners using Drupal.

Friday was the CxO day, which I blogged about earlier. Saturday and Sunday are more technically focussed.

Read more

DrupalCamp London CxO day

This year is the fifth DrupalCamp London, and today was my first time attending the CxO day. The CxO day is a single track event aimed at business leaders who provide Drupal services. I reckon there were about 100 people there, and more will come over the weekend.

It’s great that DrupalCamps cater for a wide audience, but I can’t help wonder if a separate CxO day leads to a bit of a divide between business and technical. I’d love to hear more talks that cross this divide. There must be many people who could share and learn from each other but don’t get to meet.

Read more

Speaking at DrupalCon

In September last year I gave a talk at DrupalCon in Dublin, on the topic of offline first. I wanted to reflect a little on that experience.

The topic covered how modern browsers allow us to build websites to work better under poor or non-existent network conditions. I chose this because my previous experience writing native mobile apps has given me some insight into the issues with mobile connectivity. Until recently, that’s something that native apps have generally been better at addressing than the web, but now that’s changing.

Read more

A first look at layouts in Drupal core

Today, I started looking at some of the proposals to include layouts within Drupal core from version 8.3 onwards.

This initiative aims to take the functionality that currently exists for laying out blocks and regions, and to use it for displaying other things, such as content entity view and form modes.

Read more


On Saturday I took a trip up to Manchester for an unconference organised by the North West Drupal user group.

An unconference is like a conference, but without a pre-planned programme. You go, ideally prepared to speak about a topic or lead a discussion, and the schedule is defined on the day. It’s a great environment for anyone new to public speaking, or for trying out a new talk. You needn’t worry about small audiences either - sessions often naturally turn into discussion groups.

Read more

CMI masterclass

Yesterday I was fortunate to attend a masterclass on Drupal 8’s configuration management initiative, led by Alex Pott.

The configuration management initiative (CMI) is one of the largest changes from Drupal 7 to 8. Many of the techniques and workarounds that we as Drupal developers and site builders had established for Drupal 7 don’t apply or are very different, and the Drupal community is still figuring much of this out.

Alex Pott is one of the core maintainers of Drupal and the CMI lead, so it was great to be able to pick his brains!

Read more