Someone asked me how I display different header images on urlgreyhot depending on what section (corresponding to the global nav tabs) you are viewing. My solution might not be exactly simple or the best way to go, but it works. Here are the steps:
1) I use the path_auto module to create URLs depending on either node type or vocabulary. So in my pathaoto settings I have weblog entry urls created as "weblog/[title]" and everywhere else the URL is either created manually or built based on the category (taxonomy term) so the services section urls are "services/[page title]".
2) In the PHP-Template theme, I do a regular expression check to see what the path is and assign a variable depending on what section we're in, e.g.
$dapath = $_SERVER["REQUEST_URI"];
if (eregi("/personal/services*.*",$dapath)) {
$sect = "services";
}3) I put that variable in the body tag:
<body id="<?php echo $sect; ?>">
4) I place an empty div in the page, which will be the placeholder for header image:
<div id="section-header"></div>
5) I put a rule in my style sheet to display the appropriate image depending on what section is being displayed:
#services #section-header {
height: 131px;
background: #fff url(bg-sect-about-me.jpg) top right no-repeat;
}This is also how I display a selected tab in the global navigation. The idea there would be to make each link in the nav have an ID, so you can then apply a CSS rule for #services #services-menuitem, for instance. It's a serviceable method. Do you do something similar in a perhaps more elegant way? How do you do it?