Diamond sponsors

Fields, Bricks, Paragraphs, etc... What's the next? Media Driven Content Architecture.

Profile picture for user yaremchuk
Vasyl
Yaremchuk
Drupal Practice Lead
Speed&Function
Type
Talk
Experience level
Advanced
Duration
20 minutes
Room
3.03 germanium
Starts at
Ends at
Industry track
Summary

We are looking for the best way to organize our content on a Drupal site. Now we commonly set Paragraph field instead native body field to get featured landing pages. Paragraphs have extremely flexible interface, and powerful customization abilities, but they aren't reusable. There is the contributed module that allow to clone paragraphs between different nested entities but unfortunately we have to create a clone of content item rather than use the same paragraph in another nested entity.

Media Driven approach for the architecture of Drupal sites is proposed in the presentation. We have to create a set of Media Bundles even for text content and include that content in our nodes, blocks, paragraphs, etc. as entity references. We can set several different Entity Browsers to make this process extremely user-friendly.

Description

Several case studies are provided to demonstrate the power of abstract Media Bundles.

The first example is pretty transparent. We use Pull Quote Media type with two fields:

- Quote (Text Area)

- Author (Text Field)

Quote inserted inside Body text

We can use that Media Quote in content by different ways. For example, we can create nested paragraph with Entity Reference to that Media type or Embedded Entity Button in CKEditor that allow to insert Quote inside any WYSIWYG field. Now we just need to create each quote one time as Media content and just use it somewhere where we want. The best idea to manage such stuff is to set Entity Browser that shows all available on our site Quotes via Entity Browser View. The same approach is also reasonable, say, for testimonials.

Embedded Quote media inside WYSIWYG

The second example is a bit more fundamental. There is a revolutionary idea to organize all links that we are going to use as Link Media type items. Let’s add references to Link Medias instead native Drupal Link fields in content types, paragraphs and any other content entities. We need get rid Drupal native menu system and replace it with the stuff nested references to Link Media entities. What's the advantage of such approach? Let’s imagine that we had an external link, say, to the list of openings on some 3rd party service. We had that link in several menus and in some callout paragraphs. By some reasons we decided to manage that stuff inside our Drupal site, now we have internal page with the listing of openings. And we have to change that link only in one place in our Link Media entity. Please compare that approach with the old school native Drupal links. Also it worth to use such embedded entities in WYSIWYG fields instead the native link button.

 

The first example was taken from our recent project for some US university. The second example was used in our small internal project but looks like we can extend that approach to the enterprise.

Platinum sponsors