Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Theming Drupal 7 - Meet your new best friend, render()

1,632 views

Published on

Published in: Design
  • Be the first to comment

Theming Drupal 7 - Meet your new best friend, render()

  1. 1. • –•• –
  2. 2. ••••
  3. 3. UPGRADE … its only gotten better!
  4. 4. • • – –• • – –• • – –• • – –
  5. 5. • –• – •
  6. 6. … cause D6’s $variables were a PITA to modify function THEME_preprocess_node(&$vars) { $vars[‘classes_array’][] = ‘node-’ . $vars[‘zebra’]; }••
  7. 7. • •• •• • • •
  8. 8. function THEME_preprocess_html(&$vars) { drupal_add_css(path_to_theme() . ‘/fix-ie.css’, array(‘weight’ => CSS_THEME, ‘browsers’ => array(‘IE’ => ‘lte IE 7’, ‘!IE’ => FALSE), ‘preprocess’ => FALSE) );}
  9. 9. • function THEME_preprocess_html(&$variables) {} function THEME_process_html(&$variables) {}• function THEME_preprocess_FOO(&$variables) {}
  10. 10. • • – – – – – – • – – regions[FOO] = FOOBAR; regions_hidden[] = FOO;
  11. 11. • –••••••

×