Drupal 7 + jQuery.columnizer
This article was automatically recovered from archived versions of this site via the Wayback Machine. It is likely outdated or contains formatting errors, as it has not been reviewed.

Drupal 7 + jQuery.columnizer

July 18, 2012
drupaljqueryColumnizer

So, you want to use jQuery.Columnizer with Drupal 7. Not so fast, my friend.. :-)

Update: As it turns out, the new version of the Columnizer now works with older versions of jQuery, too. This should make things a lot easier. You will still need to install jQuery Update.

First of all, it doesn’t work with Drupal’s bundled version of jQuery. “Well, no prob!”, you think. “We have jQuery Update. That should take care of it.” Well it doesn’t: Columnizer doesn’t work with jQuery 1.4 nor 1.5. It requires 1.6 it seems. So, let’s update jQuery Update to the current 2.x-dev, because that integrates jQuery 1.7. Great!

But now, the fun starts.. half of the administration UI (node/add et al) is borked, the Admin module stops to work completely and due to the JS errors piling up in the console, Columnizer doesn’t work either. But again, it seems like there’s a fix for that in this issue queue, which lets you define a different jQ version to use for admin pages and the like.

Now the admin module still doesn’t work. It does work on admin pages but not on the actual front-end, since we load jQuery 1.7 there and not 1.5. With the help of some existing patches from the issue queue and a dirty “let’s delete that line and be done with it”-fix, it actually works with 1.7, too. I will put that in the issue queue on d.o. but for now, I just need a working module to build a new website. The patched and fixed file is available as a download from below. Just replace the current Admin 7.x-2.x-dev’s version with this one and you can use jQuery 1.7.

But - Columnizer works, too! Yay! Now I can build a script to provide a pretty advanced fallback solution for CSS3 multi-columns for unsupported browsers. This should be fairly easy with some feature testing, maybe I’ll use Modernizr for that. I had a look at a couple of multi-column jQuery tools but Columnizer has the best feature set it seems. Tho, there hasn’t been a new version for a while. But then, as long as it works.. :P