Skip to main content

Our blog

Join us at the DrupalSouth Code Sprint

by Kim Pepper /

The Drupal open source project only exists because of code contributions by tens of thousands of developers and Drupal focused companies around the world. In his recent post, project founder Dries Buytaert blogged that “The Drupal community has a shared responsibility to build Drupal and that those who get more from Drupal should consider giving more”.

Australia’s contribution to Drupal code is significantly underrepresented, with PreviousNext the only Australian company in the Top 100 contributors listed on Drupal.org’s global marketplace. DrupalSouth represents the best opportunity for a wider pool of Australian Drupal developers to change this status by participating in DrupalSouth's official Code Sprint, being held on Wednesday, 26th October.
 

Read the full post

Launching an AJAX modal from a WYSWIYG link and customising the response with MainContentRendererInterface in Drupal 8

by Sam Becker /

On a recent project a feature was requested to allow admins to launch some content within a modal window from the WYSWIYG on a Drupal 8 website. The goals were as follows:

  • Open any content on the site in a modal window.
  • Fall back to a plain link for search engines and non-js based browsers.
  • Implement a branded modal design.

This is how we accomplished it.

Read the full post

Custom views filters with Search API and Simple Hierarchical Select

by alastairmoore /

A recent project involved the use of the Simple Hierarchical Select module to input category data for a particular content type. Simple Hierarchical Select provides a clean way of browsing hierarchical vocabularies to easily add taxonomy terms to nodes.

An initially tricky user interface problem to utilise this module with Search API and Views exposed filters was solved using a couple of Drupal 8 plugins and a bit of smart thinking!

Read the full post

Base themes without the bloat

by Rikki Bochow /

Base themes in Drupal are incredibly useful but often add bloat to the finished sub-theme when care isn’t taken to remove unnecessary css files, or files that are 5% used and 95% overridden. When porting aGov to Drupal 8 we took the opportunity to improve how it’s theme inheritance is managed, making it easier to create trim, lightweight sub-themes.

Read the full post

Introducing Drush CMI tools

by Lee Rowlands /

Now we've got the experience of a number of production D8 sites under our belt we took the time to consolidate our CMI workflow into some useful drush commands.

And naturally we've open sourced them.

Read on to find out more about our drush CMI tools.

Read the full post

Drupal 8 FTW: Is it a test or is it a form? Actually, its both

by Lee Rowlands /

As you'd be aware by now - Drupal 8 features lots of refactoring of form procedural code to object-oriented.

One such refactoring was the way forms are build, validated and executed.

One cool side-effect of this is that you can now build and test a form with a single class.

Yep that's right, the form and the test are one and the same - read on to find out more.

Read the full post

Injecting Dependencies into Drupal 8 plugins

by alastairmoore /

As part of our code review process for a current project, it was suggested that rather than calling the static Drupal formBuilder function to insert a form into a custom block, we actually inject the *Form Builder service* directly into the module, and for bonus points also inject the renderer service. I'd previously had exposure to dependency injection earlier on the same project but hadn’t exactly grokked the concept fully and so with a few pointers in the right direction, I set about refactoring the code I’d written using dependency injection and Drupal services. 

Read the full post

Refactoring Drupal batch API callbacks to increase testability

by Lee Rowlands /

Drupal's Batch API is great, it allows you to easily perform long running processes with feedback to the user.

But during Drupal 8's development processes it was one of the remaining systems that didn't get the full object oriented, service-based architecture.

Much of the batch API is largely unchanged from Drupal 7.

But that doesn't mean you can't write unit-testable callbacks.

Let's get started.

Read the full post

Pagination