Skip to main content
Home
Anthony Media

Main navigation

  • Home
  • Build a Block

Breadcrumb

  1. Home
  2. Build a Basic Custom Block Component to Use in Layout Builder
  3. Build a "Text with Media" Component

Create the Custom Block Type

On the toolbar, go to Structure -> Block layout -> Block types

Click the Add custom block type button

  • Label: Text with Media
  • Description: A two column component with text and button in one column and a media item in the other. Configurable so that the text can be on the left or right of the media item.

The Text with Media block is now available in the Custom block library.

Custom block library form

Done. Next, we'll add the Heading (paragraph) to the block. 

 

  • Add the Heading
  • Add the Text Field
  • Add the Button
  • Add the Media selector

Book traversal links for Create the Custom Block Type

  • Create a Button
  • Up
  • Add the Heading

Book navigation

  • A Common Component Pattern
  • Create a Landing page Content Type
  • Set Up Your Toolkit
  • Build a "Text with Media" Component
    • Create the Heading (h2-h6) component
    • Create a Button
    • Create the Custom Block Type
      • Add the Heading
      • Add the Text Field
      • Add the Button
      • Add the Media selector
  • Theming
Powered by Drupal