The Channel Module: my vaporware which now has a strict deadline

Rhapsody in Tangles

I live in a tangled web of tangled webs. Sticky blobs of nodes soak webs of categories & containers which proceed to tangle with webs of cck types, fields, and widgets. The situation goes from bad to worse when the sticky tangle gets entangled with the already sticky situation between schedules, pathautos, workflows, actions, and access controls.By the time Satan's rats nest makes it to views, queues, themes, and arguments -- life is not worth living. And that's merely the beginning.

There’s tragic irony to these sort of tangles: it’s a tangle that wants (actually, is usually required) to be flexible and easy to work with. It is that moment, boys and girls, that I realize that I’m an idiot. Its not unlike a children’s story titled, “The possum that wished it were a swan”. And predictably, (as childrens books often are), that story ends with the possum realizing it can never be a swan, but finding ultimate joy in realizing its great to be itself.

Personally, I wish a slow, and painful death on the tangles. Which is one reasons I don’t write children books.


Is this a rhapsody on the most exotic and obscure of drupal woes[1]. It most certainly is.

Truth be told, I regularly dream that I AM a drupal install. Admittedly, its not a very interesting dream. The dream is best described as

unset($dream['#attributes'] = array( "imagery" => TRUE"));

And so my point– other than the fact that I need an editor – is that these modules are individually very powerful, but have a tendency to descend into a vicious circle of unusability caused by incomprehensibe complexity, which thereby reinforces the unusability. ::shudder::

An Awkward Dinner Party Indeed

I’ll say this: if CCK, views, category, workflow, actions, scheduler , pathauto, panels, and actions had a party, it would be a terrible party. They’d all try to talk over each other; they’d suddenly change subjects in a group conversation’s midstream; they’d act out when they felt that they hadn’t received sufficient attention; and in the end they’d probably get everyone arrested.

As a combination – they certainly do have a unique fondness for becoming unruly.

So with that overly emotional introduction out of the way, I’d like to introduce a new concept: The Channel. (new to me still counts as new).

The Channel is a Glue Which Binds A Tiny Web Universe Together

The channel is a “glue”, its not a self contained module. Put most simply, it’s a module which wraps views, and panels (or a system of views and panels) into a “channel”.What makes the channel powerful is the moment an arbitrary variable is assigned to power the channel. If there is one function in PHP that defines this module, it is FOREACH. Let’s go through the procedure.

Step 1: define the channels structure – a channel is not a page. It can be a single page, but it can also be a set of pages. The only important things one needs to do when defining the channel structure is to have a) some idea of what you want to build, b) the number of pages (and menu items, either local tasks, or default), and have a structure, and set of names for the page/menus of the channel.Step 2. Pick the various channel layouts (using panels.module). This is about as hard as picking a 2 column “panel” for the frontpage, a 3 column panel for “overview”, and a 1 column panel for “blog”.Step 3. Pick the types of “channel views” you’d like in each panel. Step three needs additional explanation. A channel view is merely a view with a special filter, which maybe could be called “channel”. This filter says nothing more than “Hey views… leave this alone… we here at the channel module got this taken care of….”. However, you might want to set a views filter such as “content-type == blog” since you know the channel module is probably going to use “uid” as its overlord variable, and you had the foresight to know that you wanted a blog page for each user :-)

Here's my ghettoriffic visual aid -- which I'm inclined to point out, I did all by myself:

So in theory, if you had 3000 users, you could generate 3000 “channels”, each with 3 pages, and create a new, and frighteningly flexible clone of myspace in a days work. I suppose that’s an example of the kind of goal I’m going after. And now, I need to get back to another goal. Finishing up my day's work.


1. This is not going to distract chx, however.