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.

What's new in D7 Theming?

1,671 views

Published on

Drupalcon San Francisco presentation. Changes in D7 relative to D6.

Published in: Technology
  • Be the first to comment

What's new in D7 Theming?

  1. 1. What’s new in Drupal 7 theming?
  2. 2. Who is this guy? JohnAlbin Just found out yesterday… me and 19 other people ( Wilkins ) wrote 50% of Drupal 7 Twitter: @johnalbin
  3. 3. What’s similar in Drupal 7? • theme functions, templates, preprocess functions are almost unchanged. • Fields in core ~ CCK • Image fields! • Images styles ~ Image cache
  4. 4. Drupal 6 Core Themes Themes That Suck Garland
  5. 5. Crappy-Themes-Be-Gone™
  6. 6. What else? • Appearance page! • Template cleanup • Numerous name changes (like sidebars and menus) • primary/secondary » main/secondary • .clear-block » .clearfix • $left/$right » sidebar_first/sidebar_second
  7. 7. What else? • phptemplate_ prefix is GONE! • $classes and $classes_array • theme functions can have preprocess functions • theme funcations now variables. ONE parameter, an array of only have
  8. 8. What else? • More regions, less hard-coded page variables • $help • $search_box • $mission • $submitted • $footer_message • Holy crap, content is now a block!
  9. 9. What else? • “Template suggestions” are dead. • Long live “theme hook suggestions”! • bartik_links() « overrides all “links” styling • bartik_links__node « just the node ones! • node--article.php « just articles • preprocess functions can add: $variables[‘theme_hook_suggestions][] = ‘node__morten’; $variables[‘theme_hook_suggestion’] = ‘node__johnalbin’;
  10. 10. What else? • JQuery UI • html.tpl.php • Granular theming • hook_page_alter()
  11. 11. What
did
you
think? Step 1) Locate this session on the DCSF site 
h.p://sf2010.drupal.org/conference/schedule Step 2) Click the “Take Survey” link

×