From the course: Drupal 9 Essential Training: 5 Layout

Unlock the full course today

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

Creating a custom block type

Creating a custom block type - Drupal Tutorial

From the course: Drupal 9 Essential Training: 5 Layout

Start my 1-month free trial

Creating a custom block type

- [Instructor] In this video, we're going to create a new custom block type. Now it's very similar to custom content types, and there's some tremendous advantages to doing this. We're not limited in our blocks to just a title and a body. All right, go to structure, block layout, and block types please. And click add custom block type. What we're going to do here is add a custom block type that's going to house a PDF from our media manager for download on particular pages. All right, in the label, call it downloadable PDF. Put a checkmark in create new revision. This way we can keep version control on our block, and click save. All right, click manage fields. Now we automatically get a title and a body. The body we can update as description. So click edit, and let's call this download description. Click save settings. Let's add the media field. Click add field. Once again, even here in blocks we have exactly the same…

Contents