Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

The Entity Browser module in Drupal 8: mission and configuration

Parent Feed: 

Creating unique content is a direct way both to Google’s and your customers’ hearts, and Drupal 8 is making the road much smoother and the journey more enjoyable! Creating interactive HTML5 content and content modelling in Drupal 8 are just a couple of examples we’ve already described. So today, let’s take a glimpse at the Entity Browser, one of the modules from Drupal 8’s collection of media management tools.

Well, saying “one” would probably mean diminishing its capabilities, because the Entity Browser has a whole ecosystem around it and serves as the base for creating many cool browsers. It’s like a large box of treasures, and we will now unbox some of them.

How Drupal 8’s Entity Browser makes content editors happy

Great times have come for content editors (and not only for them), since the appearance of Entity Browser, an incredibly flexible tool for handling (browsing, selecting, creating etc.) entities. With it, it’s possible to drag-and-drop multiple images at once, reorder or remove them, reuse them for other articles, upload more images in the process, easily search for related content by various criteria, create and add quotes without opening a new tab, create another piece of content without leaving the original form, embed entities into WYSIWYG, and much more.

Plugins for the Entity Browser

Entity Browser relies on Drupal 8 core plugins to do its work. The heart of Entity Browser is the Widget plugin, which is responsible for selecting and creating entities. The Widget Selector plugin deals with the options for switching between widgets, while the Selection Display plugin works with the ways the selected entities are displayed. Finally, the Display plugin determines how the Entity Browser will look.

Configuring Drupal 8’s Entity Browser

The Entity Browser’s flexibility lets it be literally whatever you want it to be and provide the perfect entity handling workflow for you. With your Entity Browser module installed successfully (as well as the Ctoools module just for this process), go to Configuration — Content authoring — Entity browsers and click the “Add Entity Browser” button. You can give it a name and then shape it to your liking.

1. On the same page, select the general features of the Entity Browser by configuring the necessary plugins.

  • The display type of your entity browser can be: a standalone form, an iFrame container, or a modal window.
  • The available widgets can be presented as: a dropdown menu, a single widget or horizontal tabs.
  • The options to show the entity selection area to the editors are: a preconfigured view, no selection display, or multi-step selection display.

2-3-4. Configure the details of your display type, widget selector type, and entity selection area.

The next three steps involve a more detailed configuration (sizes, styles, auto-opening etc.) of the plugins you have selected above. This will not take long — some of them even require no further configuration.

5. Add the widgets to your browser.

Equip your content editors with as many powers as possible. The available widget plugins are: “View”, “Upload,” “Entity form,” and “Upload images.”

Congrats — your Entity browser is created!

Ready browsers to choose from

You can also pick one of the very nice pre-configured browsers created on the basis of the Entity Browser. They are contributed Drupal modules you also need to download and install: Media Entity Browser, File Entity Browser, Content Browser, Entity Browser Enhance(d|r), and Slick Browser.

Thunder and Lighting

There also are full Drupal distributions using the Entity Browser. They are called Thunder and Lightning and are meant to provide an improved editing experiences.

Entity Browser and Inline Entity Form

The Entity Browser’s incredible “friendliness” lets it interact well with a great number of other tools. Among them, we would like to mention one we already discussed — the Inline Entity Form module in Drupal 8.

Entity Browser and Inline Entity Form are used together for creating new entities and browsing existing ones.

This is just a glimpse at the Entity Browser module, but its capabilities are endless. Moreover, the future looks very bright for the concept of media handling due to Drupal 8’s media initiative. To get help with configuring the Entity Browser module, building custom features, or migrating to Drupal 8 with all its innovations, you are welcome to contact our developers.

Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web