GovWebworks News

Sharing Toolshed with the Drupal Community

New Drupal module reduces the need to rebuild common components
GWW Staff

GWW Opinion

GWW Staff

January 30, 2018

We’ve had Drupal in our wheelhouse since 2010, so it’s an honor to give back to one of the best open-source content management systems out there. We’ve done that by contributing bug fixes to existing modules, and this week, GovWebworks developer Liem Khuu submitted a new module called Toolshed.

Toolshed addresses the issues our developers encounter every time they set up a new Drupal instance. Toolshed simplifies setup by taking care of basic functions all at once.

Open source

The beauty of open source is that developers can contribute modules that extend core capabilities and address coding issues. “A Drupal module is an extension or plugin that adds functionality to your website,” explains Acquia, Drupal’s supporting company. “Modules can either be included in Drupal itself (these modules are known as core modules) or can be separately created and added to your website (contributed – also known as contrib modules).”

According to, “because the module code executes within the context of the site, it can use all the functions and access all variables and structures of Drupal core. This approach allows Drupal core to call at specific places certain functions defined in modules and enhance the functionality of core.”

Toolshed module

Our developer, Liem Khuu, put together an internal toolshed of utilities that are reused on client projects. “Toolshed helps us quickly set up common Javascript and navigation block functionality for new projects,” says Khuu, who has been building Drupal sites for more than seven years.

Khuu decided to submit the Toolshed module to help other developers reduce the need to rebuild common components or commonly reused features. The tools in the module make it quicker and easier to build interactive pages and administration forms, with conventions for handling:

  • Third party settings forms
  • Common blocks (navigation, administration)
  • Menu link resolution
  • Javascript event handlers (media query events, passive events, etc…)
  • Javascript widgets (responsive pager, accordions, etc…)
  • Common Drupal render elements and admin UI building tools.

The submodules, Toolshed Menu and Toolshed Media, provide additions to the core module. Some of the functions include:

  • toolshed/screen-events – Registers a common onResize, onScroll and on breakpoint events
  • toolshed/dock – Library for docking of toolbars to the window
  • toolshed/accordions – Behavior and library for creating simple accordions
  • toolshed/pager – Interactive pager for controlling navigation of items

We hope Toolshed will be useful to others as well. We’re glad to be part of the Drupal community and to help other developers as they have helped us.

Learn more

Was this post helpful?