Embedding Drupal Views with the Paragraphs module

The Paragraphs module has been super helpful to developers and site builders who want to provide content editors with a solution to create amazing looking sites without having to know HTML.

I’m currently using Panels/Panelizer and Fieldable Panels Panes in the Drupal build at work to allow content editors to create the pages they want. Panels overall is great but I’ve come across situations where the In-Place Editor is buggy and/or creates confusion for users. The editing experience is a little wonky for them because between the node edit form and the In-Place Editor, there’s too many ways to skin a cat.

So, with our new department sites roll-out, I’m trying something new and moving away from Panels and going all in with Paragraphs. An immediate roadblock I ran into was How do I embed a View in my paragraphs page?

Viewreference module + Paragraphs

After asking around in Drupal IRC, a nice fellow pointed me in the direction of Viewreference. Once I came across this module, things started falling into place.

At a glance
  1. Install module
  2. Create a Paragraph bundle called “Embed view”
  3. Add a Viewreference field to the bundle
  4. Viola! Embed your views.

Install module

drush en viewreference -y

or download, unpack and upload to your module’s folder.

Create a paragraph bundle called “Embed view”

Add a view_reference field to the bundle

Now you can embed Views within a Paragraph bundle!

The result:

2016 year end review

This is becoming one of my favorite things to do around the time of each new year. It’s a great opportunity to look back at the past year and take inventory of what has been done and reflect on what could’ve been better.

2016 was the year of some Drupal deep-diving. I learned a lot about some Drupal 7 modules including Panels, Paragraphs, and especially Features. Since I manage a 140 site multisite at work, being an expert at Features is absolutely critical to consistently deploy functionality across those sites.

Launched my first Drupal 8 site at Oswego (The Campaign for SUNY Oswego) to much fanfare.

I went to Acquia Engage again in Boston this past year and met some really nice people from MediaCurrent.

I worked with a very talented art professor at the college and implemented a WordPress theme based on a class design for our local children’s museum.

2016 is the year I stepped up my freelance work and have considered starting a side-business out of it. I don’t have kids so I have free time in the evenings. I love this work as well, so why not?

I didn’t dig into front-end frameworks as much as I wanted to this year, but I still think that’s coming.

Outside of technology, my wife and I bought our first house which made the last quarter of the year fly by.

I’m looking forward to a great 2017!