I was emailed on how to do to this. Here's untested pseudocode by Michael on a good approach. The code won't work exactly out of the box, but it gives you a start point. Post the working code back, please :)
1. Create a new variable that returns the section in your PHP.
2. Use the $section variable to set a class over the entire page
3. Use differently-named classes in your CSS file to change images, colours, etc.
---------------
PHP:
protected function Section($currentPage) {
if($currentPage->ParentID == 0) {
return $currentPage->URLSegment;
} else {
return $this->Section(DataObject::get_one("Page", "`SiteTree`.ID = $currentPage->ParentID AND ShowInMenus = 1"));
}
}
--------------------------------
2. Add variable to template
<html ... >
<body class="section$Section">
<h1>$Title</h1>
<div class="typography">
$Content
</div>
</html>
--------------------------------
3. In your CSS, do
.sectionHome h1 { background-image: url( homepage.jpg) }
.sectionHome .typography { color: blue };
.sectionAboutus h1 { background-image: url( aboutus.jpg) }
.sectionAboutus.typography { color: green };
.sectionServices h1 { background-image: url( services.jpg) }
.sectionServices .typography { color: pink };