Presentation: Design 4 Drupal Video Recap
The 2010 Design 4 Drupal conference in Boston at the MIT Strata Center was a smashing success, spaning two days packed with great sessions and great folks.
The 2010 Design 4 Drupal conference in Boston at the MIT Strata Center was a smashing success, spaning two days packed with great sessions and great folks.
Previously I've written about setting up APC and memcached on your desktop (or in my case laptop) using Acquia's handy stack installer (aka "DAMP"). This is another quick post in that vein.
I don't know if you've had a chance to see it yet, but we've just launched on Monday the United Nations Global Pulse site at http://UNglobalpulse.org. First and foremost, this site acts as a web presence for the Secretary General's "Voices of the Vulnerable" report on the impacts of vulnerable populations and economic crisis.
Contributing back to the community is absolutely the best part of working with any open source project. The drupal community is a particularly amazing group to work with As any attendee of the late and great DrupalCon SF can attest. So I leap at the chance to give back.
First, ChapterThree is making our first public announcement of our features server.
Your holy grail for Drupal SEO.
This document provides important actions that will help your site catch the eye of search engines. It contains an explanation of how each action benefits both the human and robot visitors to your site, and which Drupal modules and themes you can use to help you achieve that goal.
Drupal 6 provides many avenues to modify its appearance, including ways to theme a form. Recently I themed all node edit forms at once. I will share here how I did it.
The usual route to theme a node edit form, or any form for that matter, is to grab the form ID, which is used as a theme hook, and implement a hook_theme
function in template.php in the theme.
This lets you alter the theme registry to add a template file for a specific form. There are many blog posts that go into more detail than I do here on how to theme forms in general.
The above is useful if I want to theme a blog content type or the user registration form, for example. Most sites have at least a few different content types. I wanted to make alterations to all node forms at once and use a single template file. This involved a slightly different approach.
Correction: This next step with the theme_registry_alter example is not necessary. See comments below this post.
There is a theme_node_form
theme function in Drupal, which is called by all node forms. I wanted to replace or supersede this theme function with a template. I tried to do this with hook_theme, but it continued to pick up some parts of theme_node_form
in addition to supporting my template file. So it called the form array twice, causing recursion; which is not what I expected. So instead I took a colleague's suggestion and altered the theme registry via hook_theme_registry_alter()
. This seemed clean and simple enough.
This takes the node_form
theme hook and changes it from a theme function to a template, in sites/all/themes/MYTHEME/template.php:
function MYTHEME_theme_registry_alter(&$theme_registry) {
$theme_registry['node_form'] = array(
'template' => 'node-form',
'arguments' => array('form' => NULL)
);
}
?>
This worked great. But I hear that hook_theme_registry_alter
is intended for use in modules only? If you know why, please chime in with a comment. Or leave a comment on the theme registry for special cases handbook page.
Here is what I did. This creates two columns for the form and places all top level form fieldsets on the right.
Screenshot:
And here is how I did it...
Just a note to all kindly Drupalists and your followers. I'll be appearing at SxSw interactive to talk about Drupal in the Cloud, sporting an updated presentation which includes info on how we're using BZR to create a "cloud platform", where all that's going anyway, plus details about our forthcoming Mercury on-demand service.
One of the great things happening this year at DrupalCon North America — Moscone Center, San Francisco, April 19th - 21st; sign up now — is the community is organizing to offer a number of focused trainings in advance of the conference itself. For those looking to build their Drupal skills and come away with practical knowledge, the rel="nofollow">pre-conference training sessions offer solid takeaways on a number of subjects.
We are all really excited that DrupalCon will be happening in San Francisco this April, and now we're really excited to help bring our Drupal knowledge to the masses. We are a part of nine different and wonderful sessions proposals for DrupalCon, focusing on design tools, designer/developer interaction, Agile project management for Drupal, Drupal in the Cloud (with our partners at Rackspace), Drupal as a product platform, how to grow your Drupal firm, and Continuous Integration & Automated Testing.