Each day, more Drupal 7 modules are being migrated over to Drupal 8 and new ones are being created for the Drupal community’s latest major release. In this series, the Acquia Developer Center is profiling some of the most most prominent, useful modules, projects, and tools available for Drupal 8. This week: Display Suite.
The co-maintainers of Display Suite Kristof De Jaeger and Bram Goffings (swentel and aspilicious on Drupal.org) go way back in their "Drupal-lives". Bram actually got his start in Drupal working as an intern under Kristof on ... you guessed it! ... Display Suite! Nowadays, Bram is the technical lead at Belgian agency Nascom and Kristof is a Drupal core developer and co-owner of a small digital agency in Belgium called eps & kaas. Kristof told me his company’s name “is very funny if you understand Dutch,” but didn’t actually explain me why ... :-)
What does the Display Suite Display Suite do?
Display Suite (“DS”) gives you the power to control how your site content is displayed using a drag and drop admin interface--without any of the coding or deep Drupal-technical knowledge of theme template files you’d need otherwise. With Display Suite, you don’t need to ask your developer colleague, Drupal service provider, or geek friend for help arranging your nodes, views, teaser lists, search results, comments, user data, etc. You can just get on with arranging how your content is displayed.
Kristof explains that "DS simply works out-of-the-box (as soon as you have entities on your site), “It allows you to swap out layouts for every entity and for every view mode available on your site using the Field UI.” Even better, “It also allows you to access and rearrange display fields in the Field UI that are otherwise (without Display Suite) unavailable to you.”
Why is this important?
“One of the reasons I wrote Display Suite all those years ago was to give power to front-end people so they could easily configure entities and view modes. They can do all this without me or other developers having to create template files for them because they didn't know all the internals of render arrays, or nodes.” Here we get a clue about his deeper motivation, “So in some ways, it relieves the burden a bit for developers to focus on what they love more, and front-end developers don't have to bother developers.” :-)
This happy arrangement has led to DS’s popularity: Drupal.org reports back almost 160,000 installations. And there are almost certainly more in the wild, given that not every site reports back its module usage.
Resources - See for yourself!
- Check out the Drupal.org Screencasts & articles about Display Suite page.
- Kristof also made a comprehensive series of 11 videos documenting Display Suite in Drupal 7. As of the writing of this article, there isn’t an equivalent series of videos for Drupal 8, but the concepts and configuration of the layouts are basically the same in both versions. Here he is in the second video, explaining how to configure a layout with Display Suite:
“The first code as actually in a project called 'Node displays' for Drupal 6. We were building a SaaS project in Drupal 6 and wanted an easy interface for clients to rearrange all fields themselves. The CCK [ed.: Content Construction Kit, the precursor to today’s fields and entities in core] screens were a bit weird and didn't support, for example, the 'title' field or have a way to expose regions in the interface. The first proof of concept was literally 3 lines long and did the job. It became a lot bigger after that, especially when we realized that we wanted this behavior for every entity. So DS was born! Entities in D6 didn't really exist yet though, but we supported users, nodes, comments and some other contrib Display Suites. When entities become real in D7, this made DS even more powerful out-of-the-box.”
Has Drupal 8 changed this Display Suite?
Display Suite didn't change much conceptually for Drupal 8. The codebase is a bit smaller, however, mainly because some of its functionality has been outsourced to Drupal 8’s new core features. View Modes and Form Modes have moved to core. DS doesn’t maintain its own configuration anymore, apart from one small settings file. Now it’s all taken care of by D8’s configuration management system and its 3rd Party Settings API. Display Suite no longer handles layouts directly. There is now a Layout Plugin Module (that Kristof hopes might end up in core one day) for D8 that registers layouts and exposes them in a way that both DS and Panels can use (finally united!).
Bram Goffings did most of the Drupal 8 port, starting in 2013--fairly early in D8s development cycle. Bram told me how doing this work helped him understand the new core API's and get up to speed early, too. Kristof and Bram would do “mini-sprints” every few months to keep up with Drupal 8’s then-rapidly-shifting inner architecture. “We only had to change small portions of the code each time to the new APIs.” This turned out to be of huge benefit overall because, “We uncovered bugs and regressions in Drupal 8 core fast and way earlier than if we’d only started porting the module a couple of months before release. We also got the chance to learn all the new stuff in D8 without the pressure of an imminent release breathing down our necks.” They were thus able to make Drupal 8.0 much more stable and useful out of the gate. I say they can be justly proud of this effort and I think they saved the folks working on core a lot of stress late in the game.
Bram admits that he’s spread a little thin lately, “trying to be an awesome dad,” and says he’s, “a bit sad that I can't find the time to fix the last open issues ... And I also would love to have more time to increase test coverage.” Anyone who feels like helping, go talk with Bram and Kristof!