Thanks. That sounds reasonable.
Message: 2 Date: Thu, 18 Oct 2007 20:59:23 -0400 From: sander-martijn lists@severeddreams.com Subject: Re: [support] Different header image for each section To: support@drupal.org Message-ID: 4718016B.9080903@severeddreams.com Content-Type: text/plain; charset=windows-1252; format=flowed
The simplest way would be to create a block for each section and choose to show it only for that section (eg. for about you would put about and about/*).
How you create/populate the image into that view depends on whether it should be user editable, automatically rotating etc. It's pretty straight forward to create a view that displays an image in a category (randomly if you want), for example.
Bob Morse wrote:
We?re working on a redesign of an existing site. They new design includes a photo in the header. But I?d like one photo to appear on all pages for one section (all pages grouped under one subject) of the site and a different photo for all pages of another section of the site, and so on. Any ideas on the simplest way to implement this? We?re using 5.2.2.
In situations where the image is static, CSS works well.
For example, in your page.tpl.php file: <?php $sectionname = some function that returns section name?> <body class="<?php print $sectionname ?>"> <div id="header>Header stuff</div>
Then in your CSS file: .section1 #header {background-image: url(image1.jpg); } .section2 #header {background-image: url(image2.jpg); }
The best way to organize the tag classes/ids depends on your site.
On 10/19/07, Robert Morse bob@morsemedia.net wrote:
Thanks. That sounds reasonable.
Message: 2 Date: Thu, 18 Oct 2007 20:59:23 -0400 From: sander-martijn lists@severeddreams.com Subject: Re: [support] Different header image for each section To: support@drupal.org Message-ID: 4718016B.9080903@severeddreams.com Content-Type: text/plain; charset=windows-1252; format=flowed
The simplest way would be to create a block for each section and choose to show it only for that section (eg. for about you would put about and about/*).
How you create/populate the image into that view depends on whether it should be user editable, automatically rotating etc. It's pretty straight forward to create a view that displays an image in a category (randomly if you want), for example.
Bob Morse wrote:
We?re working on a redesign of an existing site. They new design includes a photo in the header. But I?d like one photo to appear on all pages for one section (all pages grouped under one subject) of the site and a different photo for all pages of another section of the site, and so on. Any ideas on the simplest way to implement this? We?re using 5.2.2.
-- [ Drupal support list | http://lists.drupal.org/ ]