328 Results
  • Latest
  • Oldest
Article
Posted on 15th September 2021
Takes about 6 mins to read

Does writing hooks make you sad because the code is too procedural? Are you keen to use the object-oriented programming approach that Drupal and its service container enable, wherever you possibly can? Read on if you answered yes to any of those questions.

Published in: #Drupal Planet #alter hook #object
Article
Posted on 27th July 2021
Takes about 21 mins to read

This article assumes a basic knowledge of the building of custom modules, the Drupal 8 / 9 Migration system, and the processes behind creating customised migrations from a previous version of Drupal. One of the more common components of any migration from a previous version of Drupal is the need to migrate files. In Drupal 7 there was a core ‘File’ entity type and on pretty much all of our clients' sites we would also...

Article
Posted on 20th July 2021
Takes about 4 mins to read

Sometimes it can be handy to have extra pages for a node (or any entity). For example: * To show different sets of information on separate pages for a single product, page, or thing. * So you can set different access requirements on each page for a node. * You want to block access to the ordinary route (e.g. node/123 and its aliased equivalent) for some reason, but you still want some other page to...

Article
Posted on 14th June 2021
Takes about 3 mins to read

I'm a fan of configuring things for display through Drupal's admin UI. It gives site builders confidence and power. What if you want to place blocks or views listings in amongst fields on pages of content? For example, to display: A listing (view) of related content, such as accessories for a product A standard contact block, advert, or some other calls to action in the middle of the content, exactly where the user is best 'caught' in their journey, rather than having to stick those in sidebars or after all the content fields. Some specific value(s) pulled from fields on some indirectly related entity, through a token, such as details from a taxonomy term representing the 'section' that a page is in. Consistent relevant links on user profiles to take people to common destinations This is where the Entity Extra Field module (entity_extra_field) comes in. It supports embedding blocks, views or values to be replaced via tokens. So a site builder can set these up to be managed just like ordinary fields on the page (whether it's a node, term, paragraph, or any other type of content).

Article
Posted on 9th June 2021
Takes about 5 mins to read

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 surrounding page? Often you have to resort to fetching the entity for the current page out of its route parameters (e.g. on a node page)...

Article
Posted on 1st April 2021
Takes about 3 mins to read
The last year has highlighted to us all how important it is for the global community to come together and solve problems. We rate ourselves highly at ComputerMinds, and figure it's time to share and stretch our abilities to the full. So I'm here on this special day to announce that we are branching out beyond just resolving bugs on websites, to fixing any kind of bugs in any problem space. There's so much market...
Published in: #Drupal Planet #Drupalgive
Article
Posted on 16th March 2021
Takes about 2 mins to read
I think the majority of us would say that we are not moving as much as we were pre-lockdown and pandemic. If you are then well done! A lot of us have lost a commute and access to our usual exercise regime and are pretty stationary at home working and/or with our kids. Of course, we could always go on ANOTHER muddy walk. However, I don't know about you but I'm pretty fed up of...
Published in:
Article
Posted on 12th January 2021
Takes about 5 mins to read
Update! Since this article was written, a new 'lenient' composer endpoint has been created on Drupal.org to support using modules with Drupal 9 that haven't been marked as compatible with it yet. See the documentation, which boils down to adding a new common entry under 'repositories' in your composer.json, above the usual https://packages.drupal.org/8 one. The rest of this article is still useful for understanding how patching fits into composer's workflow. The vast majority of community-contributed...
Article
Posted on 11th November 2020
Takes about 2 mins to read
This article is part of the series
Core web vitals

TLDR : Check your cookie popup! It seems everyone is talking about core web vitals at the moment, spurred on by Googles’ recent announcement that page experience (which includes core web vitals) will start influencing search ranking in May 2021. We won’t go into detail on web vitals in this post - there is plenty of information already on the web, including from Google themselves on the excellent web.dev site. Instead, this post will look...

Published in: #Drupal Planet
Article
Posted on 27th October 2020
Takes about 3 mins to read
This article is part of the series
CM Drupal Contribution Challenge 2020

Over the last year or so, I've got quite engaged with Drupal slack. I've loitered in channels like #d9readiness and #config, discussed issues with members of the security team, and asked questions to module maintainers (and received answers!). But most of all, I've helped people out in the #support channel. This has been an interesting experience in many ways, so I thought I'd share my reflections. The Drupal slack workspace is intended for the community...

Published in: #Drupal Planet #contributing