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

Build a "Text with Media" Component

The Text with Media component is a two column layout. It consists of four fields that are displayed on the page and three others that provide configuration information. Only content editors can access configuration. 

Text items are either on the left or right of the media item. As an example, this is Text left.

Display Fields

Heading

Text field (plain)

Text 

Text field formatted long

Button

Link

Media

Media (entity reference)

 

Configuration fields

Heading style (h2-h6)

List 

Background color

List

Layout alignment (text left or right of the media item)

List

 

  • Create the Heading (h2-h6) component
  • Create a Button
  • Create the Custom Block Type

Book traversal links for Build a "Text with Media" Component

  • Layout Builder in Your Toolkit
  • Up
  • Create the Heading (h2-h6) component

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
  • Theming
Powered by Drupal