Drupal Mini-Case Study: Theatre Without Borders (pt 2.5)

[Original discussion here and here.]

I wanted to write a bit more detail about users vs. nodes, and the specific problem I was facing with this.

[IANAP – I am not a programmer, so my description here might get a little creative…]

In Drupal, almost all content is built off of nodes. A node is base element of any post on a Drupal site – the basic default nodes are story and page. A lot of the functionality that can expand and complicate a site is designed to tap into the basic node functionality. Some modules generate a whole new node type (off the top of my head, the podcast and videocast modules do this, I think). Others just add functionality to any existing node types.

For example, taxonomy is enabled by attaching it to nodes – any node type. One of the taxonomy settings is configuring which node types to apply it to, including the default story and page. And when you add a new node type – using CCK, for example, or podcasts, or what have you – you have to go back and turn on taxonomy for these new node types.

This is part of the hallmark of Drupal’s functionality, and where developers are gently pushed when developing their modules. “Event” started out by adding a new node type, but has now morphed into extra functionality you can add to almost any node (and for legacy and ease of use reasons, they’ve included a “basicevent” node type so you don’t have to do the work). If I remember correctly, the Gmap module also did this – you could add geolocation fields to any node type.

That said, two of the most powerful Drupal functions – taxonomy and views (and CCK, so three) – work only with nodes.

Well, what’s the problem? Users – and their related information – aren’t nodes. Again – problem? Think about sites that are very focused on detailed user profiles – pictures / avatars, personal tags, categories / taxonomies, etc. The standard way of capturing this information is using “profile” – which (as far as I can tell, in lay terms) adds fields to the user record. (I’ve just read something about the bio module which may help this issue, but I remember looking at it before, and it didn’t seem to be what I wanted.)

In any case, on the Theatre Without Borders site, the same categories we wanted to use for the users – a list of countries, and a list of languages – were the same categories we wanted to use for the content. But you can’t add an existing taxonomy to users. So that was the first problem – I needed to create two sets of taxonomies – one for all the content (nodes), and one set for the user profiles.

The second problem was Views. While Views has done a great job of incorporating Profile functionality, I ran into a basic problem. What if I wanted to search the entire site for “Morocco”? I could use the search bar – sure. But I couldn’t do a simple tag search – because the user taxonomy and the node taxonomy are in different places. I.e. in Views you can pull up anything with a taxonomy keyword attached – but taxonomies that are built into profiles are a separate field / filter. (This is not a problem with Views.) So we’re back to one view for the taxonomy list associated with any node – and another View for the taxonomy list associated with users.

Again, newer revisions and tutorials of Usernode and related modules have greatly improved the usability (and understandability) of creating user profile information in nodes. But even now, I wouldn’t want to add that many layers of complexity to a site only maintained by volunteers without Drupal experience.

Technorati Tags: ,

powered by performancing firefox


%d bloggers like this: