Giving Nodes a Wardrobe - meet page_is_node() and drupal_is_front_page()

If you've been using Drupal for awhile, you probably understand template hinting and how you can format one content type differently than another, by having a template file such as


Recently, however, I had the need to format a single content type differently depending on where it was presented:

The Bleeding Edge

Some would say that I'm crazy using Drupal 7 Alpha 5 to relaunch my blog, but I needed D7 up and running for the new book anyway, and some would say anyone who has churned out code as long as me must be crazy anyway, so it doesn't much matter. Sure, it's bleeding edge, and not ready for prime time, but it works well enough at this point, and a couple months some daytime soaps won't kill anyone.

Subscribe to D7