Programming

Drupal and non-determinism

I was just working on a client site and had an epiphany as to why working with Drupal continues to be a frustrating experience for me.

As flexible and powerful as Drupal truly is, there is still an unacceptable level of non-determinism involved in working with Drupal whether it be in working with existing modules, theming or doing custom development.

Moving Tabs to the Main Menu

Developers are all familiar with the default behavior of the drupal menu systems "local tasks" (aka tabs). These appear throughout most Drupal sites, primarily in the administration area, but also on other pages like the user profile.

Generally, developers are pretty good about creating logical local tasks, meaning only those menu items which logically live under another menu item (like view, edit, revisions, workflow, etc... live under the node/% menu item).

Gotcha when editing nodes programatically

Now this one is pretty annoying to.

I'm writing a module that imports data into nodes. Sometimes this data has already been imported, and I only want to update existing rows with changes, if any.

After pulling in a row of data from the import file, I see if it already exists as a node in my database. If it does, I grab the node ID and load the existing node:

$node = node_load($existing_nid);

I then do some magical stuff and save the node using the standard:

Get Jing

I just found this very cool screencast creation tool that is free. It's called Jing. Installation is quick and pretty easy (though it does require the .NET 3.0 libraries for the Windows version).

Here's a sample screencast, a quick demo of cscope as a development tool.

 

 

Syndicate content