Taming Cerberus: Advanced Views Theming Using Templates, CSS, and Drupal's UI

Track: 
Theming
Experience: 
Beginner

The Views module, a complex and beautiful query builder, is at the heart of any customized Drupal installation. Views exposes much of its functionality to the site-builder through the Drupal UI, but its true potential and flexibility is uncovered using Views template files, which have a modular have a field-level specificity.

Most site-builders can add a views field and perhaps modify the output somewhat. But what about those times when you've got a really great-looking PDF from a designer and you just can't figure out how to make Views obey?

My friends, when that happens, you are caught in Drupal Hell. You must escape past the three-headed guard-dog, Cerberus, whose heads are Templates, CSS, and the Drupal UI. Only then can you bribe Charon to take you over the Styx.

Our primary example will be the construction of a Views-based slider that rotates through Views fields. Through this lens and the lens of several other common tasks, we will move from the construction of this View in the Drupal UI, moving into templating and other advanced Views techniques, and we will end with using hook_alter for tasks like Views SQL rewrites. We will take a practical, problems-based approach.

Intended audience: 

Beginning to Intermediate Themers and Sitebuilders

Questions answered by this session
Question 1: 
When is it necessary to modify view's HTML markup through templates?
Question 2: 
When can Views be modified through the Drupal interface?
Question 3: 
What are the common tasks that site-builders face, and what sort of tricks can be employed to get the output you need?
Question 4: 
How can I build a killer slider?
Question 5: 
What level of specificity should you employ in your templates in order to target Views fields with the type of CSS you need to apply?
3.533335
Your rating: None Average: 3.5 (15 votes)

Diamond Sponsors

 
VPS NET
Palantir.net

Platinum sponsors

 
workhabit
Trellon

Gold Sponsors

 
Duo
NorthPoint
Microsoft
Drupal Connect
HotDrupal.com
Chapter Three
Treehouse Agency