4 Reasons Why I’m Abandoning Display Suite in Drupal 8

If you’re anything like me, you’ve been using Drupal’s Display Suite (DS) module to customize your content displays for a while now. With Drupal 8 (D8), however, it’s become clear that it just isn’t needed anymore. So, I’ve decided to let go of DS—and you might want to, too.

DS is a module that has been around for as far back as Drupal 6—and currently boasts an impressive 155k+ site usage stat. It is the standard when customizing displays in Drupal. We have used it on numerous projects in the past primarily to gain four advantages:  

  1. A set of predefined column display layouts 
  2. A fieldable title in the display 
  3. The ability to create composite fields 
  4. A fieldable ‘read more’ link 

But this module has a whole set of extra functionality built in that we don’t use. The more skilled my team and I became at D8 development, the more we began to question the value of DS. Moreover, D8 itself has undergone several improvements that—for me—have rendered DS all but obsolete. Read on to hear the D8 features that led me to abandon DS altogether so you can decide whether doing so makes sense for you. 

TWIG 

Templating in D8 is vastly improved. We now have a template for nearly everything—and if it doesn’t have a template, we can make one for it. Drupal now uses the TWIG templating language that provides a range of new capabilities within templates that we didn’t have before, like simplified syntax, robust template inheritance, dynamic rendering options, and more. We take advantage of this in D8 to create custom content displays—which has reduced our reliance on DS. 

Extra Fields 

Since version 7, Drupal provides a hook to create custom display fields called extra fields or pseudo fields. These fields can be fully configurable in code and can fulfill every use case for new fieldable options within the display such as a fieldable title, a composite field, or a ‘read more’ field.

Layouts

The idea of content display layouts has been around since Drupal 7. It’s useful to have various predefined layouts for reusability. They can share a common template and reduce the work you have to do in order to alter template markup for theming.  

In D8, there is now a Layouts API  which allows you to define your own custom layout templates within your theme and use them in your content display configuration. This new feature throws the door open for reusability as well as customization for content displays. 

Reduced Technical Debt 

I enjoy removing technical debt in my projects. There is nothing quite like the feeling of a codebase that is swept clean. Efficiency and performance are both priorities on the Experience Development Team at U.Group, and abandoning DS can help improve both. By not using DS on your D8 project, you can enjoy some of these main benefits: 

  • No overhead from bootstrapping or maintaining the DS module 
  • No issues preprocessing template variables 
  • No issues leveraging core template suggestions 

Display Suite may have been useful in the past, but those days are long gone—Drupal 8 core’s features have eliminated our reliance on it. The enhanced templating system, hooks, and APIs of D8 are robust enough to allow any site-builder or developer to fully customize the content displays without any worries. So next time you’re kicking off a new project and find yourself turning to Display Suite for customization, ask yourself: do you really need it?  

Looking for more fresh takes on web development? Sign up for our newsletter to get them delivered straight to your inbox.

Get alerted to new job postings, events, and insights by registering for our monthly newsletter.