Book Image

Mastering Drupal 8 Views

By : Gregg Marshall
Book Image

Mastering Drupal 8 Views

By: Gregg Marshall

Overview of this book

Learn how to build complex displays of content—all without programming. Views were used on more than 80% of all Drupal 7 sites; now they are part of the Drupal 8 core. While most site builders and site owners are aware of views, they don't understand how to take full advantage of their power to create many amazing pages and blocks. If they use views, they might build 10 different view displays with different filters, without knowing that a contextual filter would require only a single display. Using our sample company, we'll take its existing content and evolve an ever more complex and powerful website for that company, starting with adapting the administration the user sees and moving on to making complex pages of information for site visitors. While the book is written for Drupal 8, the similarities between Views in Drupal 7 and 8 make this a useful reference for Drupal 7 site builders also.
Table of Contents (20 chapters)
Mastering Drupal 8 Views
Credits
Foreword
About the Author
Acknowledgements
About the Reviewer
www.PacktPub.com
Preface
Index

Foreword

Without Views, Drupal wouldn't be Drupal. It wouldn't be powering more than 1 million websites*—5% of all websites that have an identifiable CMS**—and there wouldn't be more than 35,000 developer accounts on Drupal.org***.

There are three keys to building dynamic, content-first websites. The first is the ability to model semantic data structures (Content Construction Kit used to be a contributed module; now, it has become entities and fields in Drupal core). The second is selecting what content you want based on any given criteria (part of Views is a database query-building UI). And finally, displaying it how and where you want (the other part of Views is a set of configurable display options ranging from HTML lists and tables to RSS feeds to web service endpoints and more).

Does this sound complicated? Views can be daunting for the first-time user. But in the hands of an experienced Drupal expert, the power and flexibility of Views brings some of the world's most important and interesting websites to life. Another consequence of its complexity is how difficult it has been for me to explain its use to others, even to figure out where to start.

After reading this unusual technical book, it is clear to me that Gregg Marshall has lived and breathed Drupal and Views for many years. This is not just another dull technical manual full of lists of dry facts. Gregg has lived up to the challenge of explaining Views, and not only does he do that, but he also shares his knowledge and experience in an engaging way. He's tied together a collection of useful exercises with the fictitious story of a Drupal service provider, a Drupal client, and her cat.

That evening Lynn logged into the new site. Clicking on the Manage menu item, she clicked on the Structure submenu item, and at the bottom of the list displayed on the Structure page, she clicked on the Views option.

About that time Jackson came in and settled into his spot near her terminal. "Hi Jackson, ready to explore Views with me?"

Looking at the Views administration page, Lynn noticed there were already a number of Views defined. Scanning the list, she said "Look, Jackson, Drupal 8 uses Views for administration pages. This means we can customize them to fit our way of doing things. I like Drupal 8 already." Jackson purred. Lynn studied the Views administration page.

The exercises cover the myriad facets of the Views interface and options and contain tips that clearly come from Gregg's practical experiences in using this tool. The story elements worked well as a vehicle to keep me engaged with the exercises. They also help link situations familiar to Drupal service providers and clients to the practical use of Views to solve them.

Views has been one of Drupal's killer apps since its introduction; it was the most installed contributed module—at 900,000 reported installs****—before it was merged into the core. Drupal 8 was released in November 2015 with a slew of new features, refinements, and lots of tricks up its sleeve. These tricks in Drupal's core include comprehensive multilingual capabilities, improved accessibility, user interfaces to build RESTful APIs and web services, structured semantic data throughout, mobile-first architecture, and plenty more, including Views built right into the Drupal core!

Thank you, Gregg!

Jeffrey A. "jam" McGuire

Evangelist, Developer Relations, Acquia

*https://www.drupal.org/project/usage/drupal

**http://w3techs.com/technologies/details/cm-drupal/all/all

***https://en.wikipedia.org/wiki/Drupal#Community

****https://medium.com/@tacopotze/some-facts-on-the-top-5-000-drupal-modules-e4d685adc081#.r5x6mutd0