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

A first try at listing the available properties


"Okay, Jackson, we've modified an existing view. I think it's time to learn how to build my own views in Drupal 8." Lynn gave Jackson a nice scratch knowing she'd be ignoring him for a few hours while she worked her way through this first view on her own.

Starting at the Views listing page (Manage | Structure | Views), Lynn clicked on the Add new view button that is prominently at the top of the Views listing page. "This is a nice change from Drupal 7, where adding a view was just an unformatted link." After the page loaded, Lynn faced an empty form similar to the one here:

The blank Add new view screen

"Okay, this doesn't look too complex. Let's call this view Available Property Listing," said Lynn, as she typed the view name into the first field. Drupal automatically converts the name entered into this field into a machine name for Drupal to use internally.

Tip

Generally, the machine name generated by Drupal is fine, but if you want to change...