Quickly Implement a Block as a Paragraph in Drupal 7

Disclaimer: As with most tasks in Drupal, there are several ways to do this. My goal here was to see how quickly it could be done without writing code and without introducing unnecessary complexity.

Goal — quickly implement a newsletter listing (using Views) that can be dropped into any paragraph field and can have a unique title per use.

The output would be a simple block from Views. We already use Display Suite, so naturally we use a DS-centric approach.

Create the view

I used a “Listing” view mode on the E-Newsletter Archive Issue content type (well, on many content types throughout the site)


Create a new paragraph bundle


Add a title field (we are required to have at least one field)


Choose a “One Column” Display Suite layout, which enables the “Custom fields” pane

Click the “Add a block field” button


Add the block field as shown


Drag the field into the content region


Change the title to an H3 (doing it this way requires “field templates” from Display Suite Extras)

We use this anyways, so naturally it’s a quick win.


Add the new paragraph bundle to your paragraph field(s)


Try it out


This is a one-trick pony. I’ve done this in the past where it was more complicated and the user could choose from a list of prebuilt output components (like the Newsletter Listing); in that scenario I used a single paragraph bundle with a select list. Then, using some preprocess hooks I spit out the component they wanted based on the select list choice.

Tagged with: , , , , ,
Posted in Development

Leave a Reply

Your email address will not be published. Required fields are marked *