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

Summary


Views' ability to rewrite results is one of its most powerful features. Almost any output format can be created in a results rewrite. We started by showing how you can configure a richly formatted link to any content or external site. Then, we did a simple rewrite of content to make the open house display look better, followed by a more complex rewrite to add more information to the property map. Finally, we looked at how to do a conditional rewriting of a value to allow an if-then-else like logic.

In the next chapter, we'll cover the rest of the options in the center column of the view edit page. Custom headers, footers, and special messages if a set of filters (defined, exposed, or contextual) results in no results. Finally, while we looked at the Views pager a little during Chapter 6, Add-on Modules, when we switched to the infinite scroll module, there are various ways of dealing with a larger number of results, such as a view all link or using the powerful pager built into views...