Snippet: node type specific CSS files

Published on Fri, 2009-01-02 - 21:45

I just wrote a fun little bit of code for answering a question on our Danish Drupal community site.

The user in question wanted to add different CSS-files, depending on the type of the node used as the main page content, and I just wanted to share a little bit of code demonstrating how much can be a achieved very easily with Drupal's very flexible theming system.

So with no further ado, here it is:


Preparing for Drupal 7 by changing the way to make parameters for db_query.

Published on Sun, 2008-11-16 - 19:49

After attending DrupalCon in Szeged and following the new database stuff, I thought a bit about how to make the transition easier when Drupal 7 comes out.

I didn't think that it was anything special, but Robert Douglass encouraged me to share it, so here you are:

I figured out that you can actually use the Drupal 7-style of arguments to db_query right now (more or less).


Drupal and Varnish HTTP accellerator

Published on Fri, 2008-10-17 - 15:03

For many reasons, it's a good idea to have a HTTP accelerator/reverse proxy on your webserver to take some of the burdens of HTTP and cache away from Apache and PHP. Squid is most commonly used for this purpose, but after hearing about fellow Dane Poul-Henning Kamp's creation, Varnish, I decided to try that out before messing with that many-armed monster, Squid.


Drupal database performance: MySQL and PostgreSQL compared.

Published on Mon, 2008-10-13 - 03:13

As a long time open source user and a chronic challenger of own assumptions, I often test out the alternatives to my current prefrences. While I used Linux, I tended to switch desktop environments every two months or so. I tried out all the e-mail clients, all the browsers, all the VCSes, and even (almost) all the text editors. Before settling with Drupal, I tried out all the CMSes I could find.

I'm starting my own Drupal shop

Published on Wed, 2008-10-01 - 00:26

So, I'm finally able to break the news. I've been planning this since before DrupalCon, but there's been a lot of things needing to get done before I could take the final step and do it.

I am, as of half an hour ago, a registered independent business owner in the kingdom of Denmark. I am not alone in this. I have a very good friend and mentor backing me up and guiding me every step of the way – and for that I'm grateful.

Subscribe to Mikkel’s blog