nodes for breakfast

we eat nodes for breakfast

Recent posts

Organize your module code with hook_hook_info() (Drupal 7)

Mon, 02/20/2012 - 10:41 -- m.stenta
Drupal 7 introduced a wonderful new hook called hook_hook_info(). It's an optional hook that module developers can use to organize their code and increase performance (a bit). It basically allows you to declare the hooks that your module implements, and optionally separate them into multiple files, so they aren't all in one *.module file. Read on to see how it works.

Add/remove columns from a compound CCK field with hook_update_n()

Tue, 02/14/2012 - 11:04 -- m.stenta
As is sometimes the case when you're building software, requirements change, and in my case I needed to change the data architecture of my compound CCK field after it had been released to a live site. I wasn't able to find many articles explaining the proper way to do this, so I dug into a few modules that have already figured it out, and the following is a basic overview of how to do it.