Embed presentation
Download to read offline









![… cause D6’s $variables were a PITA to modify
function THEME_preprocess_node(&$vars) {
$vars[‘classes_array’][] = ‘node-’ . $vars[‘zebra’];
}
•
•](https://image.slidesharecdn.com/d7theming-130212134536-phpapp02/75/Theming-Drupal-7-Meet-your-new-best-friend-render-10-2048.jpg)



![• •
–
–
–
–
–
–
•
–
–
regions[FOO] = FOOBAR;
regions_hidden[] = FOO;](https://image.slidesharecdn.com/d7theming-130212134536-phpapp02/75/Theming-Drupal-7-Meet-your-new-best-friend-render-14-2048.jpg)



This document discusses various tips and tricks for theming in Drupal, including adding CSS styles conditionally for specific browsers, preprocessing node variables to add classes, preprocessing HTML variables, using preprocess and process hooks, and defining and hiding regions.









![… cause D6’s $variables were a PITA to modify
function THEME_preprocess_node(&$vars) {
$vars[‘classes_array’][] = ‘node-’ . $vars[‘zebra’];
}
•
•](https://image.slidesharecdn.com/d7theming-130212134536-phpapp02/75/Theming-Drupal-7-Meet-your-new-best-friend-render-10-2048.jpg)



![• •
–
–
–
–
–
–
•
–
–
regions[FOO] = FOOBAR;
regions_hidden[] = FOO;](https://image.slidesharecdn.com/d7theming-130212134536-phpapp02/75/Theming-Drupal-7-Meet-your-new-best-friend-render-14-2048.jpg)

