Using Paragraphs to Weave a Beaufitul Content Tapestry

Posted on Wed, 5/11/2016
2 minutes read

Paragraphs is a pretty great module for making landing pages or reusable components that get thrown in multiple spots on a site. I've been using it for probably 6+ months and we've used it on multiple pages in production. this session made me realize some thing I could do to do it better.

Presented by David Needham & Les Lim. View the slides! also view the session page on Drupalcon.

Why would you use Paragraphs? You want two columns on a page, but you want it to be easy for the author. Don't do HTML in the body field, that's a blog and not nice.

  • Blobs
    • bad for computers
    • bad for non-coders
    • bad for maintenance
  • Alternatices to blobs
    • fields & template files
      • extremly felxible
      • difficult to change
      • difficult for non-coders
    • fiels & display suite
      • UI interface available (to admins)
      • reusable templates
      • doesn't need custom code (but it helps)
    • panels
      • just don't it is the worst (my words, not theirs)
    • Paragraphs!

Paragraphs lets site builders weave together beautiful (good for people) pages using clean, ordered, XML-friendly (good for computers) content.

How Paragraphs work

  • Paragraphs replace the Body field
  • Many paragraph types can be created
  • each paragraph type can have a different set of fields
  • some examples of paragraph types:
    • "Content" Paragraphs
      • Text
      • Pull Quote
      • Image
      • Video
    • "Layout" Paragraphs
      • Aside
      • Accordion
      • Two Column
    • Pony
      • Specialized use cases for your particular client

At this point my mind has been blown on how to make Paragraphs easier for clients. Spliting layout & content into seperate things would be a great idea!

Using in Drupal 8

  • Installed
    • Paragraphs
    • Entity References Revisions