For the record, here's my solution.
To recap, I have a home/splash page (`index.php`) distinct from my gallery index page (`gallery-index.php`) - and I want them to have different body classes, so that the splash gets a background image, and the gallery index doesn't.
In Zenphoto, the `$_zp_gallery_page` global resolves to 'index.php' on both pages.
So:
`
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
$gallery = strpos(curPageURL(), 'gallery');
?>
<body <?php if ($_zp_gallery_page == 'index.php' && $gallery === false) { echo 'class="home"'; } ?>>
`
If `$_zp_gallery_page` is 'index.php' AND the page URL does not have 'gallery' in it, add the class 'home' to the body element.
Note that if you have called your gallery index page something else like 'overview', you will have to substitute 'gallery' for 'overview'.
If anyone has a more elegant solution I'd be keen to hear it. What we really need is a pair of functions like in Wordpress: `is_home()` and `is_front_page()`. ;-)
Here it is working: http://jaslehalphotography.co.uk/