Adding content blocks

The Drupal Kit includes templated content “blocks” for placement within page layout. After saving a Flex Page, click Layout > Add block > Create content block to access the list of available block types.

Contents

Available block types

Note

Developers: under the hood, most block types are custom compound field types. The can be re-used as standalone fields on content types.

Call To Action

The Call-to-Action (CTA) provides a standalone button with custom text that prompts the user to use the link. This text is typically written as a command or action phrase linking it to anything with a URL (on your site or an external site). This could be a web page, an event, a document, a contact form, etc.

An image of the Call to Action

The Call to Action

Flex Content Area

The Flex Content Area, as its name implies, is a highly flexible block that can yield a variety of looks. It includes an image, headline, copy text area, a single call to action link, and list of links. You can add multiple Flex Content Area items on a single page. The image below shows two instances of Flex Content Area, one with a list of links, the other with a “call to action” button.

Flex Content Area examples

Examples of Flex Content Area, with a list of links (left), and with a “call to action” button (right).

Flex List

The Flex List allows content editors to display multiple instances of header + content pairs. Choose between 3 display variations in the “View mode” dropdown: default list, accordion, and horizontal tabs.

Flex list, showing default list, accordion, and horizontal tabs displays.

Reorder items using the drag-and-drop editing interface.

Hero

The Hero is a block consisting of a large image and the following optionally displayed textual fields:

  • Heading

  • Subheading

  • Caption

  • Credit

  • Call to Action link – an internal or external link with URL and Link text

The Hero looks best on pages in full-width or near full-width regions, so generally it is best to upload high resolution images (ideally 2280x1232 pixels). The system will deliver smaller image derivatives when viewed on smaller screens.

Change from Drupal Kit version 2

All fields on the Standard Page and Landing Page Hero images now are present in one Hero block.

The Hero Display Styles are 6 selectable options for displaying the Hero layout which vary the placement of the textual fields and the image. Select display options for the Hero in the Layout Builder settings tray (see the Formatter), or on the Custom Blocks configuration page (see the view mode).

Hero styles

Default: Large media with optional caption and credit line

Hero with default option

Style 1: Bold heading & subheading on burnt orange background, floated right

Hero with option 1

Style 2: Bold heading on dark background, anchored at base of media

Hero with option 2

Style 3: White bottom pane with heading, subheading and burnt orange call to action

Hero with option 3

Style 4: Centered image with dark bottom pane containing heading, subheading and call-to-action

Hero with option 4

Style 5: Medium image, floated right, with large heading, subheading and burnt orange call-to-action

Hero with option 5

Instagram

The Instagram block provides a scrollable list of posts from any Instagram account. The list will display the nine most recent Instagram posts. On focus/hover, each Instagram displays its description and links to the original content on Instagram.

Screenshot of Instagram block in site.

To set up an Instagram feed, see Integrating external content.

Photo Content Area

The Photo Content Area is similar to the Flex Content Area, and allows for an image with a photo credit, a headline, copy text, and link(s).

  • The ratio of the image is 3:4. For best results, use an image with those proportions to avoid having the uploaded image cropped.

  • Images can display with or without borders.

  • The optional “Credit” displays in italics directly below the image, as shown below.

  • Text elements display to the right of the photo in wide column widths (see image below) and below the photo in narrow column widths (see image below).

Photo Content Area example

The Photo Content Area displayed in wide column width (left) and narrow column width (right)

Promo Lists

Promo Lists provide the ability to add many content-rich featured items on a page, without taking up much space.

  • You can add multiple promo list containers to a single page, and each group can have multiple list items.

  • Lists can display in various combinations:

    • Choose “Single list full” for a one-column list of items that spans the width of its container (see example below).

    • Choose “Single list responsive” to produce a two-column list that spans the width of its container.

    • Choose “Two lists, side-by-side” to produce a one-column list that spans half the width of its container.

  • The link may be an internal page or external link.

  • Images display at 85 x 85 pixels.

  • Images can display with or without borders.

Promo List example

The Promo List

Promo Units

The Promo Unit, similar in content to the Promo List, adds an unlimited number of pre-formatted “units” of content, each of which can contain an image, headline, copy text, and call to action link.

  • Images can display as three styles:
    • Landscape (220x140)

    • Square (140x140)

    • Portrait (150x188)

  • Images can display with or without borders.

  • Optionally add a headline above all individual Promo Units on a page (as shown below).

  • Content will default to a horizontal layout when the region width can accommodate it; content editors may set the display explicitly to vertically stacked content.

  • Promo Units with multiple items can display in 1, 2, 3, or 4 items per row. See Control items per row (multi-item block types) for more detail.

Promo Unit example

The Promo

Resources

The Resources block provides an unlimited number of pre-formatted units of content, each of which can contain an image, headline and links. There is no copy field.

  • Resource collections can display with image adjacent to links (“Default”) or above links (“Stacked”); on some screen widths, Resources will automatically stack to better fit the available space.

  • Images can display with or without borders.

  • Resources can also display in 1, 2, 3, or 4 items per row. See Control items per row (multi-item block types) for more detail.

Resources example

Two Resources blocks - in main region (left, “Default” display), and in a sidebar region or on mobile display (right, “Stacked” display)

Rich text areas (including images)

The easiest way to add open-ended rich text content to a page is via “Basic Block” content. It includes a rich-text toolbar for applying styling to text, and for embedding images or videos. The simplest way to access this interface on a Flex Page is to choose Layout > Add Block > Create content block >Basic Block.