94% of attendees gave my session a 5 star (79%) or 4 star (15%) rating.
Back in December I gave a talk on using Tailwind with Drupal, and why, for me, it makes sense in an agency environment where long-running projects are worked on by large(ish) teams. You can watch the talk now on YouTube, if you’re interested:
Utility-first CSS is a topic that can really work people up, and two nights before the talk a Twitter thread of hot-takes about how Tailwind is either for those who don’t know how to use CSS properly, or for those who…
Bamboo Twig is a great Drupal module which gives you a lot of extra Twig functions to work with Drupal specific functionality in Twig without needing to write a lot of preprocess function code (in PHP).
It allows you to do things like render views, blocks, regions, entities (with view mode), fields, forms and image styles — all just in Twig.
Stage File Proxy is a Drupal module that routes local requests for a Drupal site’s file to a production version of the same site. This is useful for when you pull down a copy of a production site’s database…
This is a list I put together while doing research while we were considering a trial of utility-first CSS in the Drupal team at CTI Digital. I’ve posted the list here to make it easier to refer to in the future. If you have any organisations or websites that you think should be on this list, let me know with a Medium reaction or via Twitter.
Some people react to the suggestion of utility-first CSS with the idea that ‘it won’t scale’ or that it won’t be right for a large project, or a large team, or that it isn’t…
I’d always known about Kint, but I’d never really used it until recently. The standard
dump(thing_to_dump) command was good enough, but a conversation on the Drupal Twig Slack channel reminded me that Kint shows available methods on an object, and that was good enough to prompt me to switch.
Kint is a ‘more powerful and modern PHP debugging tool’ which is really useful in Twig development for seeing what is available for printing, and what methods are available to call.
Aleksip’s Data Transform Plugin (DTP) is a tremendous tool for people using Pattern Lab and Drupal together. It allows you to emulate Drupal’s
Url objects, which is really useful when creating Twig templates that will be consumed by both Pattern Lab and Drupal.
It also includes some useful tools for combining different Pattern Lab partials in the same way as Drupal would eventually compose elements like a form from your form, input, and submit molecules/atoms. I recently used DTP to mock a Drupal form in Pattern Lab and I wanted to share the code here because there aren’t…
At work I’m one sprint into a new project where we have decided to use Pattern Lab and component-based design for the first time. It’s going really well, and I’m learning a lot. As a frontend developer it’s great to finally have control of the markup coming from Drupal, and to be thinking in terms of components that Drupal passes data to, rather than thinking of how to use CSS and JS to massage Drupal’s default markup into looking like the designs.
With this project, I’m focusing on using as little custom code as possible, and trying to use Core…
Some notes for the Manchester FRED show and tell session:
masterbranch automatically run a deployment. My build scripts (npm and Python scripts) all run on Netlify and it does versioned deployments so I can roll back at any time. …
Note: the beta.lasttramfrom.co.uk URL is no longer valid, just use https://lasttramfrom.com instead.
As well as a new frontend, I’ve also rewritten the backend scraper in Node.js rather than PHP. The frontend and the backend’s data are hosted on Firebase, which has been great to work with.
There are some things the beta is missing though. …
Views in Drupal doesn’t seem to support a contextual filter value overriding the
<title> of a view being displayed as a page. The heading on the page changes, but the title in the
<head> of the document isn’t altered.
Here’s one way how to have a custom module take the view title (with the contextual filter override correctly inserted) and apply it to the route (page) title:
(Note that that is a very targeted
hook_views_post_render function in a specific custom module and so it bails out early if the ID and display don’t match what we’re looking for. In a more general module you’d want to remove the early return call and instead wrap lines 13–15 in another if statement)
I recently had a big clear out of my Virtual Machines directory and deleted quite a few VMs that I wasn’t using anymore. Perhaps I should have done this via VirtualBox itself, as when I next opened up VirtualBox the application’s user interface seemed frozen or locked, and all I could see was an error message about my inaccessible VMs (the ones I had deleted outside of VirtualBox).
To get VirtualBox’s UI working again, I needed to get rid of these inaccessible machines, but I couldn’t remove anything via the unresponsive user interface.
I ended up unregistering the inaccessible VMs…
Drupal front end developer at @CTIDigitalUK. Interested in the web, environment, bikes & science.