Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Views! Huh? What is it good for?

Views! Huh? What is it good for?

Slides from my presentation at Twin Cities DrupalCamp 2012 for a presentation about the Views module. An introduction to what views is, why you would want to use it, when, and how to get started building your first views.

eojthebrave

May 19, 2012
Tweet

More Decks by eojthebrave

Other Decks in Technology

Transcript

  1. Views. Huh? What is it good for?
    Saturday, May 19, 12

    View full-size slide

  2. @eojthebrave • [email protected]
    Consulting • Training • Development
    Saturday, May 19, 12

    View full-size slide

  3. @eojthebrave • [email protected]
    Saturday, May 19, 12

    View full-size slide

  4. All websites are made of lists of content.
    users
    photos
    files
    comments
    lists
    Saturday, May 19, 12

    View full-size slide

  5. Saturday, May 19, 12

    View full-size slide

  6. Saturday, May 19, 12

    View full-size slide

  7. Drupal is really good at content but
    lacks advanced features for creating lists.
    Saturday, May 19, 12

    View full-size slide

  8. Saturday, May 19, 12

    View full-size slide

  9. SELECT
    DATE_FORMAT((FROM_UNIXTIME(node.created) +
    INTERVAL -14400 SECOND), '%Y%m') AS
    created_year_month,
    COUNT(node.nid) AS num_records
    FROM node node
    LEFT JOIN node_revisions node_revisions
    ON node.vid = node_revisions.vid
    LEFT JOIN users users_node_revisions ON
    node_revisions.uid =
    users_node_revisions.uid
    WHERE node.status <> 0
    GROUP BY created_year_month
    ORDE ... blah blah blah, blah blah ...
    Saturday, May 19, 12

    View full-size slide

  10. Saturday, May 19, 12

    View full-size slide

  11. COLOR = ‘GREEN’
    Saturday, May 19, 12

    View full-size slide

  12. Saturday, May 19, 12

    View full-size slide

  13. COLOR = ‘BLUE’
    Saturday, May 19, 12

    View full-size slide

  14. Saturday, May 19, 12

    View full-size slide

  15. TYPE = ‘TRUCK’
    Saturday, May 19, 12

    View full-size slide

  16. Saturday, May 19, 12

    View full-size slide

  17. TYPE = ‘CONVERTIBLE’
    Saturday, May 19, 12

    View full-size slide

  18. Saturday, May 19, 12

    View full-size slide

  19. TYPE = ‘HYBRID’
    AND
    COLOR = ‘BLUE’
    Saturday, May 19, 12

    View full-size slide

  20. VIEWS
    The Drupal List-O-Matic
    Saturday, May 19, 12

    View full-size slide

  21. Saturday, May 19, 12

    View full-size slide

  22. Pointy clicky!
    Saturday, May 19, 12

    View full-size slide

  23. Base Table (node, user, comment)
    Saturday, May 19, 12

    View full-size slide

  24. Base Table (node, user, comment)
    Saturday, May 19, 12

    View full-size slide

  25. Display
    (Page, Block, RSS Feed)
    Base Table (node, user, comment)
    Saturday, May 19, 12

    View full-size slide

  26. Display
    Base Table (node, user, comment)
    Fields Filters Sorts
    Context Filters Relationships
    Saturday, May 19, 12

    View full-size slide

  27. Default Display
    Fields Filters Sorts
    Context Filters Relationships
    Base Table (node, user, comment)
    Saturday, May 19, 12

    View full-size slide

  28. Default Display
    Fields Filters Sorts
    Context Filters Relationships
    Base Table (node, user, comment)
    Page Display
    Fields Filters Sorts
    Context Filters Relationships
    Page-specific settings
    Saturday, May 19, 12

    View full-size slide

  29. Default Display
    Fields Filters Sorts
    Context Filters Relationships
    Base Table (node, user, comment)
    Block Display
    Fields Filters Sorts
    Context Filters Relationships
    Block-specific settings
    Saturday, May 19, 12

    View full-size slide

  30. Default Display
    Fields Filters Sorts
    Context Filters Relationships
    Base Table (node, user, comment)
    Saturday, May 19, 12

    View full-size slide

  31. Base Table (node, user, comment)
    Display
    Fields Filters Sorts
    Context Filters Relationships
    Saturday, May 19, 12

    View full-size slide

  32. Base Table (node, user, comment)
    Display
    Fields Filters Sorts
    Context Filters Relationships
    Output Style (List, Table, Grid)
    Saturday, May 19, 12

    View full-size slide

  33. Structure >> Views
    Saturday, May 19, 12

    View full-size slide

  34. Structure >> Views >> Add New View
    Saturday, May 19, 12

    View full-size slide

  35. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  36. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  37. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  38. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  39. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  40. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  41. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  42. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  43. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  44. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  45. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  46. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  47. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  48. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  49. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  50. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  51. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  52. Saturday, May 19, 12

    View full-size slide

  53. Saturday, May 19, 12

    View full-size slide

  54. Saturday, May 19, 12

    View full-size slide

  55. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  56. Structure >> Views >> “Edit”
    Saturday, May 19, 12

    View full-size slide

  57. Saturday, May 19, 12

    View full-size slide

  58. Saturday, May 19, 12

    View full-size slide

  59. Saturday, May 19, 12

    View full-size slide

  60. Saturday, May 19, 12

    View full-size slide

  61. Saturday, May 19, 12

    View full-size slide

  62. Saturday, May 19, 12

    View full-size slide

  63. Saturday, May 19, 12

    View full-size slide

  64. Saturday, May 19, 12

    View full-size slide

  65. Saturday, May 19, 12

    View full-size slide

  66. Saturday, May 19, 12

    View full-size slide

  67. Saturday, May 19, 12

    View full-size slide

  68. Some Additional Modules
    Calendar
    Views Bulk Operations (VBO)
    Location
    jCarousel
    You know, like the one on the wall in your kitchen.
    Make a list and then perform an operation on all items in the list.
    Make a list and display items as points on map.
    Make a list and then make it slidey.
    Saturday, May 19, 12

    View full-size slide

  69. Some MORE Additional Modules
    Entity Reference
    Flag
    Date
    Create relationships between things.
    Bookmark, my playlist, favorites, needs moderation ...
    Additional options for filtering and viewing dates.
    Saturday, May 19, 12

    View full-size slide

  70. Views. Huh? What is it good for?
    Saturday, May 19, 12

    View full-size slide

  71. Views. Huh? What is it good for?
    Pretty much everything ...
    @eojthebrave
    Saturday, May 19, 12

    View full-size slide