Drupal - Content Types, Views = No Query Headaches

Post on 29-Nov-2014

90 views 0 download

description

Andrew Wessels, Mike Purvis - July Refresh Hilo Meetup

Transcript of Drupal - Content Types, Views = No Query Headaches

Content Types, Views = no Query headaches

Andrew Wessels, Mike PurvisRefresh HiloJuly, 2014

Overview

Ways to capture custom information

Example (Not using Drupal)

Want to capture:

Refresh Title (text/varchar)Refresh Date (date)

Refresh Member Names (multiple text/varchar)Coffees consumed (int)

Simple tables from scratch

Main table

Where are the members?

Multi-valued attributes (Members)

Refresh Event 1

First, second, third

Drupal has Content Types

Start adding fields

Keep adding fields

Keep adding fields

(Special option on this one)

Multiple Members allowed

Now we add a Refresh Event ‘node’

Very similar to homemade

Once you have Drupal content

Can use Views Organize, filter, sort All the capabilities of

a serious SQL query in point-and-click

Plain-Vanilla View

Add simple filter

Add simple filter

Examples

Show Refresh Events using more than 10 cups of coffee

Show future/past Refresh Events

Queries built dynamically

Entity relationships FTW

Reference Users/Content

Relationships connect content/users

Refresh Event Online Member

• Refresh Title• Date• Online Member(s)

• Name• Phone Number

Tracking ReunionsPerson

State

High School

University

Andrew’s connections

More complex View