What's new in D7 Theming?

1,523 views
1,489 views

Published on

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

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,523
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
43
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

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

×