•
    –
•
•
    –
•
•
•
•
UPGRADE … its only gotten better!
•       •
    –       –
•       •
    –       –


•       •
    –       –
•       •
    –       –
•
    –



•
    –

        •
… cause D6’s $variables were a PITA to modify




    function THEME_preprocess_node(&$vars) {
      $vars[‘classes_array’][] = ‘node-’ . $vars[‘zebra’];
    }

•



•
•   •
•   •
•   •


    •
    •
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)
  );
}
•

    function THEME_preprocess_html(&$variables) {}
    function THEME_process_html(&$variables) {}

•

    function THEME_preprocess_FOO(&$variables) {}
•       •


    –
    –
               –
    –
               –
    –
        •
    –
    –
            regions[FOO] = FOOBAR;
            regions_hidden[] = FOO;
•
    –
•



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

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

  • 2.
    – • • –
  • 3.
  • 4.
    UPGRADE … itsonly gotten better!
  • 8.
    • – – • • – – • • – – • • – –
  • 9.
    – • – •
  • 10.
    … cause D6’s$variables were a PITA to modify function THEME_preprocess_node(&$vars) { $vars[‘classes_array’][] = ‘node-’ . $vars[‘zebra’]; } • •
  • 11.
    • • • • • • •
  • 12.
    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) ); }
  • 13.
    function THEME_preprocess_html(&$variables) {} function THEME_process_html(&$variables) {} • function THEME_preprocess_FOO(&$variables) {}
  • 14.
    • – – – – – – • – – regions[FOO] = FOOBAR; regions_hidden[] = FOO;
  • 15.
    – • • • • • •

Editor's Notes