Three New Drupal Modules for Ambitious Site Builders
Can you believe Drupal 10 has been out for four months now? Neither can we! We have three (yes, three!) new module releases for Drupal, all of which are compatible with Drupal 10.
In continuing with the theme that Drupal is for ambitious site builders, each of these enhances the site-building experience for content managers and content authors.
Read on to see what we’ve released!
Views Minimum Condition
First up is an update to the Views Minimum module. If you missed our post last year on this module and what conditions and contexts are, check it out.
In short, Views Minimum provides a condition that will evaluate a selected view and its selected display for results and return true or false if the View is empty or not (i.e., has at least one result). This will make it possible to not only hide the area where the View would be but also to hide or show other areas of a page based on this condition. That means you can hide various areas of a page like listings or dynamic information provided by Views in just a few clicks.
We’ve been using this module with great success on our projects since then. Recently we added an additional feature — the ability to check for embedded Views.
Sometimes a Drupal View with no results isn’t truly empty — there are cases where you could embed a View within a View. For example, if you wanted to create a View that showed all products of Category X, you could set a View to display if that query comes back with no results. This is useful in cases where you want to show a visitor all the appropriate information possible.
We made an update to Views Minimum to consider that kind of setup when evaluating if the View has results or not. With just a click, it will now look through every View embedded in the empty result area (as well as that Views configuration, too).
With that update, you can embed Views within Views as much as you want. If you’re using Site Studio, Layout Builder, or even just a regular old Block, you will want to check out Views Minimum.
Acquia Site Studio Views Element
In keeping with the theme of modules for ambitious site builders, we’ve released a new module for Acquia Site Studio that adds a new custom Element to Site Studio.
This Element lets you pick from a list of Views to display as part of a Component. It allows content creators to skip a handful of steps when displaying Views within an Acquia Site Studio Component.
Without this module, you would need to do the following to display a View in a Component:
- Create block displays for a View
- Add those block(s) to the ‘Hidden Region’ theme for Site Studio
- Edit a Component
- Set that Component to use one of those new blocks
- Remember to export all configurations so the block and component configuration is not lost
With this module, you simply select which View to display from within your Component. No need to deal with blocks, regions, configurations, and the like. This greatly simplifies the task of component management in Acquia Site Studio and grants them a rapid way of creating components that output dynamic displays powered by Views.
This module also pairs very well with the Views Minimum module mentioned above.
OpenAI / ChatGPT for Drupal
Last but certainly not least, we’ve made many changes to our OpenAI / ChatGPT integration for Drupal 10.
Since we first released this module, the reception has been overwhelmingly positive. We’ve received lots of feedback from users around the globe and many people are pitching in to contribute code and ideas for AI integration in Drupal.
This module provides value for ambitious site builders, and much of our time has been spent developing features into the module for them. One particular focus has been creating tools and ideas to augment the content editing and content management process.
Our last release contained several changes. One of the biggest changes was that we have begun integrating ChatGPT tools into CKEditor 5. CKEditor 5 is the default WYSIWYG editor for Drupal 10 and where many content authors will spend their time writing content. By installing the OpenAI CKEditor submodule that comes with the OpenAI integration module for Drupal, you can add this new plugin to your WYSIWYG easily.
There are so many great options available that show off the assistive nature that artificial intelligence in Drupal can provide:
- Text Completion — Generate text from ChatGPT from anything you ask it.
- Adjust Tone/Voice — OpenAI will rewrite the selected content into whatever you ask it to. For example, selecting a paragraph of text and asking it to make it more ‘professional’.
- Summarize — Selecting a paragraph of text and clicking Summarize will condense the text down into the shortest form possible.
- Translate — Selecting a paragraph of text in CKEditor and clicking Translate will let you change the text from one language to another and back again.
- Ask ChatGPT — General assistance from the conversational aspect of ChatGPT.
- Generate Image – Generate images with DALL-E, OpenAI’s image generation service.
- Sentiment Analysis — OpenAI will analyze the selected text for you and report if the content is hateful, violent, or commits other content violations.
The real power of having features like these is rolling them up / combining them.
For example, imagine you select some text and click “Sentiment Analysis.” OpenAI may report back to you that the content is too hateful/mean. Next, you can click on “Adjust Tone/Voice” and type in ‘friendlier’ and OpenAI will do its best to rewrite the text into that tone.
This video demonstrates the power of OpenAI and ChatGPT in CKEditor 5.
You can see that OpenAI took the text, made it friendlier, then made it more professional sounding. Just for fun, we also translated it into Spanish. All of this in a matter of seconds.
These are some very powerful tools we’re putting into the hands of content creators in Drupal and can’t wait to see what people can do with them.
The CKEditor additions are just one of several additions we have made, too. We will have another article coming up soon about those.
Meet Me at Drupalcon 2023
If you’re attending Drupalcon 2023 in Pittsburgh, PA this June, come see my lightning talk on OpenAI / ChatGPT and Drupal 10. I will also be available in the Velir booth every day to discuss all things AI, Drupal 10, and whatever questions you may have.
Get the Drupal 10 Development Cookbook
Are you curious about how to develop modules, themes, and plugins or how to be a great site builder for Drupal 10?
The "Drupal 10 Development Cookbook" is co-authored by Matt Glaman and me. Matt is a long-time Drupal contributor to Drupal Core, Drupal Commerce, and the broader community space. He has provided great tools and integrations like PHPStan and drupal-check, and he has created or maintained several modules.
We cover a wide variety of topics with hands-on examples so you can get up and running with Drupal 10 in no time. These topics include running Drupal locally with Docker-based tools, content modeling, creating custom modules, how to do automated testing, and migrating data into Drupal from various data sources. The book will help you understand how to develop and build modules just like the ones we talk about in this article.
You can pick up the book on Amazon as a physical copy or for Kindle.