December 2009

Dec 17 2009

Drupal 7 theming basics

Posted by amandar

I am no expert on Drupal theming, but I recently attempted to convert one of my Drupal themes to Drupal 7 and it was pretty stressful at times! I'm gonna try and outline some of my changes here. The theme I am attempting to update is http://www.drupal.org/project/orange/

.info files

.info files have changed. The content variable has been removed for Drupal 7, so you need to declare the region in your .info file or you wont even be allowed to enable the theme. Also because of problems with sub-theming style.css is no longer added by default. You will need to also declare this in your .info file.
Like Drupal 6 if you want custom regions and js files you declare them here as usual.

<?php
regions
[content] = Content
stylesheets
[all][] = css/style.css
?>

page.tpl.php

Page.tpl.php has some changes, for one you no longer have to have html head or body tags. This data is contained in a the page variable. Regions are also in the page variable. At the top of your page.tpl.php you'll see:

<?php print render($page['header']); ?>

At the bottom you'll see:

Dec 18 2009

The Drupal 7 User Experience

Posted by amandar

The Bad
I'm sure my comments will be really late in the game but I just updated my local Drupal 7 installation to start converting my themes to D7 and what at first was excitement quickly turned into disappointment. At first glance the modal admin UI was interesting, refreshing even, but then doing simple tasks like creating content became a source of frustration because I had no idea where to find it!

The block admin page is a mess and extremely difficult to use, I actually prefer the D6 block admin. I feel this page should not be a modal, I like being able to see what region is where as I'm assigning content to it. Also I am not seeing where to create a new block, I dunno if I am brain dead or something but I cant find it...?? This is really upsetting to me because the D7 team has supposedly been working really hard to improve the UI. The block admin just totally falls short.