Quick and dirty theme upgrade from Drupal 6 to 7

posted by Ishmael Sanchez on Mar 31, 2011

Drupal 7 has been out for a bit and I have done a handful of ports of themes from 6 to 7 and rather than go through the in depth list of items to do on Converting 6.x themes to 7.x each time, for quick ports you can follow the list below.

Info file

  • Change version
  • Add two new regions: help and highlighted
  • Change features[] for navigation (if applicable)


  • Remove from body tag up and $closure and down (rely on new core html.tpl.php)
  • Delete $footer_message, $primary_link, $secondary_links and $search_box
  • Remove any hard coded skip to content links and add <a id="main-content"></a>
  • Primary and secondary links are now $main_menu $secondary_menu
  • New region highlighted (AKA mission)
  • Change regions from print $something to render($page['something'])
  • Add $action_links (ex. add a blog post)
  • Add $title_prefix/suffix (RDF Goodness)


  • Clean up node wrapping div (use default $classes)
  • Add <?php print $attributes; ?> to wrapping div
  • Add <?php print $title_attributes; ?> to header titles
  • Replace $picture with $user_picture
  • Add $display_submitted check
  • Add <?php print $content_attributes; ?> for RDF goodness
  • Use render API for $content


  • Clean up block wrapping div (use default $classes)
  • Add <?php print $attributes; ?> to wrapping div
  • Add title prefix and suffix variables
  • Add attributes <?php print $content_attributes; ?> and use render API for $content


  • Make sure features[] section in your info is right (ex. primary_links vs main_menu)
  • Screenshots will have to be remade (Width now 295px)
  • clear-block is now clearfix (Use find and replace to fix)
  • Dump box.tpl.php if you use
  • Possible remove block.tpl.php and rely on core if you don't have lots of customizations
  • Possibly use new html.tpl.php

Post new comment

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.

Ishmael Sanchez