Different header on different node.


Author Message
Mindhunter

Posted: 1/6/2010
Quote message 

I've bought Artisteer and i'm still quiet amazed of this great program.

But i have a problem.

I would like to have different headers on different node,

For example:

On node/41 i want header1.jpg
On node/65 i want header2.jpg

How can i make this work???


 
Don

Posted: 1/6/2010
Quote message 

I would be nice to only have the header on the main page in many instances or even to have a much smaller header on all other pages just to save space. I know you can do this manually but the ability to do this in the template would be nice but probably impossible.
 
mindhunter

Posted: 1/14/2010
Quote message 

Most of the time there's a simple answer ....

Anyone???

I really would like to know how to get a different header on a different node.

Please help me...

Would be great! thanx!
 
mindhunter

Posted: 1/16/2010
Quote message 

change:

In page.tpl change:


<div class="art-Header-jpeg"></div>


to:


<img src="http://www.yourwebsite.nl/images/
<?php
if ($node->nid == 52) {
print 'Header.jpg" />';
}elseif ($node->nid == 43){
print 'Header2.jpg" />';
}elseif ($node->nid == 3){
print 'image-3.jpg" />';
}elseif ($node->nid == 4){
print 'image-4.jpg" />';
}elseif ($node->nid == 5){
print 'image-5.jpg" />';
}elseif ($node->nid == 6){
print 'image-6.jpg" />';
}elseif ($node->nid == 7){
print 'image-7.jpg" />';
}elseif ($node->nid == 8) {
print 'image-8.jpg" />';
}elseif (($node->nid == 9) | ($node->nid == 10)){
print 'image-9.jpg" />';
}elseif ($node->nid == 11) {
print 'image-11.jpg" />';
}else {
print 'default-image.jpg" />';
}?>



Works great!

 
Cecilia

Posted: 4/20/2011
Quote message 

I cant get this to work =(

I'm using Artisteer 2 and Drupal 7. My header section of the page.tpl.php looks like this:

<div class="art-header">
<div class="art-header-png"></div>
<div class="art-header-jpeg"></div>

<?php if (!empty($site_name)) { echo '<h1 class="art-logo-name"><a href="'.check_url($front_page).'" title = "'.$site_name.'">'.$site_name.'</a></h1>'; } ?>
</div>

How can I get this to work?

I really want different images on the different pages and would appreciate all help I can get =) Thanx!
 
Mark C

Posted: 4/20/2011
Quote message 

Create 2 themes and use contexts module to use on theme on the frontpage only (with the large header) and the other theme on all other pages (with the small header).

http://drupal.org/project/context
 
Cecilia

Posted: 4/27/2011
Quote message 

That is not really what I'm looking for. I want one header image for each of my main navigation links, so its about 6 different images...

Any one know how I can get this to work?
 
Mark C

Posted: 4/27/2011
Quote message 

Then create 6 different themes and use contexts module to use different theme on each page depending on the link that is clicked on.

http://drupal.org/project/context
 
Cecilia

Posted: 5/15/2011
Quote message 

Yes it works!

Thank you Mark for pointing me in the right direction with creating different themes. I created 6 different themes with different header image and then used Theme key (http://drupal.org/project/themekey) to set which theme should show on which site. Works perfectly!

Thanks again! :-)
 
Mark C

Posted: 5/16/2011
Quote message 

No worries, it was actually a bit of a guess, as I've never used either of those modules myself before. Themekey seems like something I might give a try to though.
 
Tuomas Leppänen

Posted: 5/20/2011
Quote message 


Just replace your body line in template.php with

<?php $nid = arg(1); ?>
<body <?php if (!empty($body_classes)) { echo 'class="'.$body_classes. ' ' . 'node-' . $nid.'"'; } ?>>

Voila, all your nodes have node-x body class you can use to theme your header, body, or anything on certain page