Not registered
register now
DrupalCamp LA 2009

Preprocess functions

Note: this is an archived site. Visit us at http://ladrupal.org.
69
Sign In
  • php
  • preprocess
  • RDF
  • theming
  • Code & Development
  • Design & Usability
  • Intermediate
Logistics
Day: 
Saturday
Time: 
2:30p
Room: 
PingVision room - DBH 1600 (1+)
Duration: 
One hour

Understanding the possibilities of using preprocess functions can greatly reduce theming time and increase theme sustainability.

“The main role of the preprocessor is to setup variables to be placed within the template (.tpl.php) files” (drupal.org documentation). Preprocess functions can create, manipulate, and unset variables before page rendering to ultimately allow you to dynamically alter content before presentation. Not only can the content, but which template file is called can be modified as well by modifying the array of template file suggestions. This, along with the ability to dynamically alter element attributes, such as CSS classes, IDs, and RDFa attributes based on context allows you to create dynamic site content, layout and styles, while also providing a framework for providing semantically rich RDF data.

Preprocess functions are a powerful aspect of the Drupal theme system. This session will be dividing into thirds, first discussing the overall idea of preprocess functions, how they work and what they can do, then examples will quickly show some of the possibilities, and finally we will wrap up with a short conversation about the philosophy of the drupal theme system, content and design separation, and the role preprocess functions tie into both worlds.

This topic was discussed at DrupalCamp Colorado.

Pre-requisites:
Attendees should be relatively comfortable with basic PHP and at least have a general understanding of the templating system

Files:
The template.php file and presentation can be downloaded directly from the pingVision website via:

  • The code – template.php
  • The presentation – pdf
  • Login to post comments

Comments

no screencast?

Submitted by roninsa on Tue, 2009-08-11 13:27.

Just wondering

  • Login to post comments
  • Schedule
  • About
  • Attendees
  • Sponsors
  • News
  • Drupalchix
  • Venue
  • Sessions
  • Forums
  • FAQ
  • Contact Us

About ultimateboy

Full Name
Matt Tucker

Company
pingVision

Link to web site
http://pingv.com

Interest
Drupal Service Provider

View full user profile

Attendees

Filter Sessions

  • All Sessions
  • Your Picks
  • Most Popular
  • Business Side
  • Code & Development
  • Design & Usability
  • Drupalchix
  • Performance and Scalability
  • Showcase & Strategy
  • Site Building
Drupalchix Panel Talk

Buy our Drupal Camp LA shirtBuy our Drupal Camp LA shirt

Become a Sponsor

Attendees

View All

Drupalchix Information

View all Sponsors

  • News
  • FAQ
  • About LADrupal
  • Become a Sponsor
  • Twitter

Designed and Built by This By Them
Powered by Drupal 6 / copyright © 2009