mastering drupal 8 views
play

Mastering Drupal 8 Views http://bit.ly/D8Views Amanda Marshall - PowerPoint PPT Presentation

Mastering Drupal 8 Views http://bit.ly/D8Views Amanda Marshall Gregg Marshall About Gregg Digital Technology Developer Manager (Drupal Architect) drupal.org since 2006 1 st DrupalCon 2010 San Francisco About Amanda BS


  1. Mastering Drupal 8 Views http://bit.ly/D8Views Amanda Marshall  Gregg Marshall

  2. About Gregg • Digital Technology Developer Manager (Drupal Architect) • drupal.org since 2006 1 st DrupalCon 2010 San Francisco •

  3. About Amanda • BS Business, CU Denver • Graduate certificate energy & sustainability, DU • Drupaleasy Academy graduate • drupal.org since 2008 1 st DrupalCon 2017 Baltimore • • Intern on a UN humanitarian response Drupal site • Drupal Developr at Brad Jones LLC • Looking for full-time Drupal developer job Aided by Jackson

  4. Disclaimer All content provided in this presentation is my personal opinion and for informational purposes only. I am speaking for myself. I am not presenting as a representative of my employers. Neither my employers nor I make any representation regarding, and assumes no responsibility or liability for, the accuracy or completeness of, or any errors or omissions in, any information contained herein.

  5. What is Views? • Views == Views module (before D8 http://drupal.org/project/views) • Creates dynamic lists • A “report writer” • View == a single list

  6. Why Views? • 5 Most recent blog posts block Manual • • Add blog post • Edit block with title and link Automatic (aka Views) • • Add blog post • Block updates

  7. Views is in Drupal 8 Core • Views was #1 Drupal 7 contributed module • D7 required Views and CTools contributed modules • Front page and many Drupal administration pages are now views

  8. Drupal 8 Views Examples Front Page

  9. Drupal 8 Views Examples Content List

  10. Drupal 8 Views Examples Files View

  11. Drupal 8 Views Examples Who’s Online

  12. Drupal 8 Views Examples People List

  13. Components of a View • Base / View Type • Display • Format • Display type • Filter • Sort

  14. A Quick Overview View Edit Screen

  15. Quick Overview View Edit Screen Left Column

  16. Quick Overview View Edit Screen Center Column

  17. Quick Overview View Edit Screen Right Column

  18. Editing an Existing View Content List

  19. Editing an Existing View Desired Result

  20. Later that day

  21. Editing an Existing View Views Listing Page

  22. Edit Screen

  23. Editing an Existing View Edit Screen

  24. Why Views – Structured Content • Drupal 7 added Fields before D7, CCK module added Fields • Relationships D7 Entity Reference module (Node Reference module) • Text, Number, Boolean, File, Image, Reference • Contributed – e.g. Geolocation

  25. Example Data Structure Real Estate Agency website Owner (Realtor) Property Label Machine name Field type Owner Address 1 field_owner_address_1 Text (plain) Label Machine name Field type Owner Address 2 field_owner_address_2 Text (plain) Property Address 2 field_property_address_2 Text (plain) Owner City field_owner_city Text (plain) Property Asking Price field_property_asking_price Number (decimal) Owner Company field_owner_company Text (plain) Property City field_property_city Text (plain) Owner Email field_owner_email Email Property County field_property_county Entity reference (County) Owner First Name field_owner_first_name Text (plain) Property Description body Text (formatted, long, Owner Last Name field_owner_last_name Text (plain) with summary) Owner Phone field_owner_phone Telephone number Property Featured field_property_featured Boolean Owner State field_owner_state Text (plain) Property Featured Image field_property_featured_image Image Owner Zip field_owner_zip Text (plain) Property Geolocation field_property_geolocation Geolocation Property Image Gallery field_property_image_gallery Image Open House Property Listed Date field_property_listed_date Date Property Neighborhood field_property_neighborhood Entity reference (Neighborhood) Property Number field_property_number_bathroom List (text) Bathrooms s Label Machine name Field type Property Number field_property_number_bedrooms Number (integer) Notes body Text (formatted, long, with Bedrooms summary) Property Owners field_property_owners Entity reference (Property Open House field_open_house_end Date Owner) End Property PDF Listing field_property_pdf_listing File Open House field_open_house_property_refere Entity reference (Property) Property Realtors field_property_realtors Entity reference (Realtor) Property Property Square Footage field_property_square_footage Number (integer) Reference Property State field_property_state Text (plain) Open House field_open_house_start Date Property Status field_property_status List (text) Start Property Zip field_property_zip Text (plain)

  26. Real Estate Relationships

  27. Creating a New View • Wizard page • Expanding form! • Not all displays can be created via wizard

  28. Creating a New View

  29. Creating a New View

  30. Creating a New View

  31. Base / View Type • Content • Custom Blocks • Content Revisions • Custom Block Revisions • Comments • (types added by contributed or custom modules) • Log Entries • Files • Taxonomy Terms • Users

  32. Displays • Page • Block • Master • Attachment • Embed • Entity Reference • Feed • REST Export

  33. Format Options • Grid • HTML List • Unformatted List • Table • Contributed Module s • Accordion • Slide Show • Map

  34. Format Options Have Settings

  35. Fields

  36. Field Settings

  37. Field Rewrites

  38. Field Rewrites Power Tip {% for letter in ‘a'|upper..‘m'|upper %} * {{ letter }} {% endfor %} * A * B * C * D * E * F * G * H * I * J * K * L * M

  39. Filter Criteria

  40. Exposed Filters

  41. Contextual Filters Filters configured via URL http://....com/available-property-listing-neighborhood /City%20Center

  42. Contextual Filters Filters configured via URL

  43. Contextual Filters Filters configured via URL

  44. Sort Criteria

  45. Sort Criteria

  46. Relationships

  47. Relationships

  48. Relationships

  49. Relationships

  50. Front Page

  51. Exposed Filters

  52. Contextual Filter

  53. Infinite Scroll Gallery

  54. JOIN US FOR CONTRIBUTION SPRINT Friday, September 29, 2017 First time Mentored Core Spint Sprinter Workshop General Sprint 9:00-12:00 9:00-12:00 9:00-12:00 Room: Lehar 1 - Lehar 2 Room: Stolz 2 Room: Mall #drupalsprints

  55. WHAT DID YOU THINK? Locate this session at the DrupalCon Vienna website: https://events.drupal.org/vienna2017/sessions/mastering-drupal-8-views Take the survey! https://www.surveymonkey.com/r/drupalconvienna

  56. http://bit.ly/D8Views Questions? 50% discount eBook, MD8V50 20% print, MD8V20 Expires Oct 15, 2017 Gregg Marshall gmarshall@vendor-tech.com http://drupal.org/u/greggmarshall Job Offers Amanda Marshall me@amandamarshall.us http://drupal.org/u/amarshall

Recommend


More recommend