From the course: Drupal 9 Essential Training: 3 Taxonomy, Media, and Modules

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Adding media fields to content types

Adding media fields to content types - Drupal Tutorial

From the course: Drupal 9 Essential Training: 3 Taxonomy, Media, and Modules

Start my 1-month free trial

Adding media fields to content types

- [Instructor] We turned the media module on in one of our very early exercises. Let's go ahead and update our content types to include some media fields. Now, to be fair, we're going to do exactly the same, so I'm going to go through this fairly quickly. Click on Structure, Content types, Article and Manage fields. Click Add field. And choose the Media reference field. And we're going to call this News Video. Click Save and continue. We'll leave it at one because we're going to embed a YouTube video. Select the YouTube or Vimeo video you want to highlight. You can add one to the Media Manager from here. Again, just a reminder, it's always good to provide good help text for your content editors. Choose remote video. Once again, we're not going to create referenced entities. We don't need to do that with the media entity. Scroll down and click Save settings. So we're going to add one video field and a media…

Contents