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

Drupal 8 is here, should I upgrade?


"Jim, this is Lynn, how are things at Fancy Websites?"

"Hi Lynn, things are going well."

Lynn continued, "I read that Drupal 8 is being released on November 19. From our conversations this year, I guess that means it is time to upgrade our current Drupal 6 site. Should I upgrade to Drupal 7 or Drupal 8?"

"Lynn, we're really excited that Drupal 8 is finally ready. It is a game changer, and I can name 10 reasons why Drupal 8 is the way to go":

  • Mobile device compatibility is built into Drupal 8's DNA. Analytics show that 32% of your site traffic is coming from buyers using phones, and that's up from only 19% compared to last year.

  • Multilingual is baked in and really works, so we can go ahead and add the Spanish version of the site we have been talking about.

  • There's a new theme engine called Twig that will make styling the new site much easier. It's time to update the look of your site; it's looking pretty outdated compared to the competition.

  • Web services are built in. When you're ready to add an app for your customer's phones, Drupal 8 will be ready.

  • There are lots of new field types built in for useful stuff such as telephone numbers, e-mail addresses, and more, so we won't need to add half a dozen contributed modules to let you build your content types.

  • Drupal 8 is built using industry standards. This was a huge change you won't see, but it means that our shop will be able to recruit new developers more easily.

  • The configuration is now stored in code. Finally, we'll have a way for you to develop on your local computer and move your changes to staging and then to production without having to rebuild content types and views manually over and over.

  • The WYSIWYG editor is built in. The complex setup we went through to get the right buttons and make the output work won't be necessary in Drupal 8.

  • There's a nice tour capability built in so that you can set up custom "how to" demonstrations for your new users. This should free up a lot of your time, which is good given how you are growing.

  • I've saved the best for last. Your favorite module, Views, is now built into core! Between Fields in Drupal 7 and now Views in Drupal 8, you've got the tools to extend your site built right into core.

"The bottom line is I can't imagine not going ahead and upgrading to Drupal 8. Views in core is reason enough. Why don't I set up a Drupal 8 installation on your development server so that you can start playing with Drupal 8? We're not doing any development work on your site right now, and we still have staging to test any updates."

"That sounds great, Jim! Let me know when I can log in."

Less than an hour later, the e-mail arrived; the Drupal 8 development site was set up and ready for Lynn to start experimenting.

Based on the existing Drupal 6 site, Lynn set up four content types with the same fields she had on the current site. These content types are outlined in Appendix, Content Types for a Sample Site. Jim was able to use the built-in migrate module to move some of her data to the new site.

Lynn was ready to start exploring Views in Drupal 8.