Introduction to
Content Types

socketwench.github.io/introToContentTypes

In the Beginning, There Were Pages

 
 
 

And then came the first redesign...

Owww...

 
 

CMSs Manage Content, not Pages

Content could be a page, but didn't have to be

 
 

Content Types Form the basis of Content Management

Content Types in Drupal

Content Types in Drupal

Content Types in Drupal

Content Types in Drupal

Content Types in Drupal

Why Structure Content?

 
 
 
 

We've got to get that organized

 
 
 

Types give organization to your content

Making Content Types

Content Type Admin Page

Manage > Structure > Content Types

Our Content Type So Far Has...

A unique Machine Name

A required Title field

A default Body field

Body Field

Multi-line, WYSIWYG text field

Optional in Drupal 8

Required in Drupal 7 (kinda)

Permissions

Grant create, edit, delete to user roles

Manage > People > "Permissions" Tab

How do we know what types to make?

Do a Content Audit

Not exhaustive, select representative content

Create mock content if you don't have any

Look for Similar Kinds

Lots of different ways to do this

Card Sorting by Donna Spencer

 
 

Blobby Bodies,
Creeping WYSIWYGs

"Just Make it Work Like Word"

Have you heard this before?

Creeping WYSIWYG

Creeping WYSIWYG

Creeping WYSIWYG

Creeping WYSIWYG

Push Model of Content

Body field isn't flexable enough for different targets

Formatting baked in once and forever

Pushing Channels

 
 
 
 
 
 
 

More Channels,
More Problems

"Just use the desktop site!"

Stuck in a cycle of zoom, scroll, repeat

Separate Mobile Site

Squeezes desktop-sized content into a tiny screen

Callouts, embedded media, pagination

Why Truncation is Bad

Real AI Based on the Human Brain
Real AI Based...
Real AI Based on the...
Real AI Based on the Human...
 
 
 
 

Separate channels multiply work

Separate processes, standards, and staff

Works only as a stop gap

We Need Adaptable Content

Pull Content Not Push

Pull Content Not Push

Pull Content Not Push

You Can't Query a Body Field

No matter the WYSIWYG buttons or smart tags you use

"Body" has no Semantic Meaning

It's the junk drawer of content

Junk Drawer Content Limits Reuse

You can't recombine pieces of content later

Smarter Content

Does not bake-in formatting

Provides front-ends with what they need

Chunky fields, not blobby bodies

Disposing of Bodies

Adding New Fields

Manage > Structure > Content Types > Click "Manage Fields"

Reusing Fields

Fields exist independently of content types

Some performance advantages

When to reuse fields

It's exactly the same across content types

It's settings will never change, no matter the type

Most fields aren't reusable

Requirements change as your site evolves

Performance gains negated easily elsewhere

*Core in D8, Contrib in D7

Adding New Field Types

Check Core First!

Field may already be provided by core

Many OotB field types in Drupal 8

Modules

Extend Drupal's functionality

"There's a module for that."

Finding New Modules

https://www.drupal.org/download

Browse by most installed, or by category (recommended)

Recommended Drupal 7 Field Modules

URL* or Link

Telephone* or Phone

Date

Email

*Drupal 8 Backports

Handling Multimedia

File and Image fields OotB

Media Module for D7

Media in Drupal 8, Tomorrow, 3:45pm ITTC #134

Installing Modules

Instructions on Drupal.org

drush en -y <module_name>

Blobby Chunks

What did we learn about truncation?

It's bad for bodies, and fields too.

Our fields need to be flexible!

Adaptable Content isn't just fields

It's packages of content

Bundles field groups with business rules

Field De-Duplicating

Breaking up the body
does not de-duplicate fields

Some "fields" are actually content by themselves!

Composite Content

Bundle up multiple fields, and content types

Easier to manage, harder to compose

Assembling Composite Content

Entity/Node Reference field type

Blocks

Panels and Panelizer (Drupal 7)

Entity Embed (Drupal 8)

Summary

Content types are just the first step

Separating channels isn't the answer

Multiplies work, only a stop gap solution

The body field is a junk drawer

Limits adaptability and remixing

Use groups of fields to
make content packages

De-duplicate with composite content

Food for Thought

Content Strategy for Moble by Karen McGrane

The Battle for the Body Field by Jeff Eaton

Card Sorting by Donna Spencer

Thank you!

socketwench.github.io/introToContentTypes

Background by Artwyrd