Posts in Code
- Here’s a quick breakdown of how to build custom workflows for easy content moderation in Drupal 8, plus a few thoughts on how to extend workflows for even more editorial control.
One of the challenges front-end developers face is adding new components to entity templates that exist outside of what is defined in the Field API; or in other words, adding dynamic components that aren’t really fields. Often this can be easily done by throwing the custom markup in a
.html.twigfile and calling it a day. But if you’re working on something that needs to be reusable, or if you’re collaborating with a site builder who doesn’t write code, the custom template route can be limiting.
Here are a few specific factors that make decoupled Drupal a good approach for a project – as well as a few that don’t.
If you use the Paragraphs module and wish there was a way to more easily control the layout of referenced paragraphs on a particular node, check out Entity Reference with Layout, a new module for Drupal 8. Entity Reference with Layout combines structured content (a la Paragraphs) with expressive layout control (a la Layout Discovery in core). Now you can quickly add new sections without leaving the content edit screen, choose from available layouts, add text or media to specific regions, drag them around, edit them, delete them, add more, and so on. The experience is easy-to-use, fast, and expressive.
Entity Import adds a user interface for Drupal 8’s core migration functionality. It lets you add importers for any entity in the system, map source data to entity fields, configure process pipelines, and of course, run the import.
As a writer or editor for your organization’s website, you should be able to quickly write articles or build pages that are collections of smaller elements.
On some of our projects, we have a requirement to connect to a VPN for server access. Our team was having an issue specifically with Cisco AnyConnect Secure Mobility Client on Mac OSX making vagrant based local development environments become non-responsive. After connecting to the VPN, SSH inside the Vagrant box would stop working, as well as visiting any local domains. From what I've gathered, Cisco AnyConnect can be a bit aggressive with local networking.
GraphQL is a trendy, front-end friendly alternative to REST. Take a look at what GraphQL means for Drupal, and learn how to install and use it!
Configuring Gatsby to run with Drupal 8 isn't difficult, but there are some tricks to it.
Recently, I ran into an issue migrating Paragraph Entities (Entity Reference Revisions) that had a few open core bugs and it ended up being really simple to solve within
prepareRowin the source plugin. It will be nice when the migration_lookup plugin can properly handle this use case, but it’s a good thing to understand how prepareRow can provide flexibility.