Header block missing

cmgui - September 25, 2008 - 07:35
Project:Four Seasons
Version:6.x-1.20
Component:Miscellaneous
Category:support request
Priority:critical
Assigned:Unassigned
Status:active
Description

Hi derjochenmeyer

I have the same problem as this: http://drupal.org/node/247792

The header block is nowhere to be found in Administer->Site Building->Blocks

I am using the latest Drupal 6.4 and the latest Four Seasons 6.x-1.20

Thank you.

Gui

#1

cmgui - September 26, 2008 - 16:47

Hi derjochenmeyer

can you show me how to fix this?
i cannot wait for the next version to have it fixed.

thank you very much for coming up with such a good theme.
if the secondary links can be a pulldown menu, that would even be better.

regards

gui

#2

cmgui - September 26, 2008 - 22:56

Ok this is what i figured out ... hope it is useful to somebody facing the same problem

vi fourseasons.info

regions[header] = Header

vi page.tpl.php

<?php
print $header
?>

and viola, the header appears!

not really what i want though .... maybe have to read the Pro Drupal Development book ...

#3

derjochenmeyer - September 27, 2008 - 13:27

HI zzzzsg, thanks for posting all this and for posting the solution. Its not a bug. fourseasons simply has no header region. If you modify the code you posted a bit you can specifically style your header region.

<?php
print '<div id="headerRegion">' .$header. '</div>';
?>

#4

CarbonPig - October 1, 2008 - 23:21

I'm having trouble getting this solution to work.

Can you provide the location of where to put the following in the page.tpl.php file, as I've tried it in a number of locations and haven't been able to get it to work:

<?php
print '<div id="headerRegion">' .$header. '</div>';
?>

Thanks,

The Carbon Pig

#5

CarbonPig - October 1, 2008 - 23:33

I'm having trouble getting this solution to work.

Can you provide the location of where to put the following in the page.tpl.php file, as I've tried it in a number of locations and haven't been able to get it to work:

<?php
print '<div id="headerRegion">' .$header. '</div>';
?>

Thanks,

The Carbon Pig

#6

CarbonPig - October 1, 2008 - 23:34

OK figured it out.

For new themers like myself it is important to know that the .info file is cached in the database by drupal, so if you simply change your .info file to create a new theme, FTP it over, and then try to refresh, you won't be able to select the region in the admin-->blocks portion. You have to first do one of three option outlined in: http://drupal.org/node/171224

"# The contents of the .info file is cached in the database so altering it will not be noticed by Drupal. (Do not confuse this with the theme registry.) To clear it, do one of the following:

1. Clear button located at "Administer > Site configuration > Performance".
2. With devel block enabled (comes with devel module), click the "Empty cache" link.
3. Simply visit the theme select page at "Administer > Site building > Themes"."

Also, in the page.tpl.php, here is where I pasted the above solutions in order to get it working....

<?php
// $Id: page.tpl.php,v 1.7.2.9 2008/06/08 23:00:25 derjochenmeyer Exp $
?>

<?php
print $head_title
?>

<?php
print $head
?>

<?php
print '<div id="headerRegion">' .$header. '</div>';
?>

<?php
print $styles
?>

<?php
print $scripts
?>

@import "

<?php
print base_path() . path_to_theme();
?>
/fix-ie.css";

#header-image { background-color:

<?php
print theme_get_setting('fourseasons_basecolor')
?>
;
<?php
if(theme_get_setting('fourseasons_basecolor') != '#FF9900') print 'background-image:none;'
?>
}
h1, h2, h3, h4, h5, #headline a { color:
<?php
print theme_get_setting('fourseasons_basecolor')
?>
; }

Hope this really helps some folks out there.

-The Carbon Pig

#7

CarbonPig - October 1, 2008 - 23:35

sorry it was messy, just assume that all the boxes with code in the previous posting are the continuous code in the page.tpl.php file.....just look at yours and that code for a minute and it should make sense.

#8

JuJu_Kelly - June 11, 2009 - 00:39
Component:Code» Miscellaneous
Category:bug report» support request

Thank you Carbon Pig for specifying where to put the above code. I am trying to be able to access the header block so I can customize headers...I am trying to use the Theme Editor Module to edit the page.tpl and I have tried to put the above code but when I do & I click save it shows code on the page. Am I doing something wrong?
FYI-I am new to drupal but love my Four Seasons theme.
Thanks in advance

#9

ivangut - June 14, 2009 - 03:12

If you want download correct page tpl you can doawnload here ...
( with correct header )
You can remove admin widget and logo and ...

AttachmentSize
page.tpl_.php.txt 4.53 KB

#10

JuJu_Kelly - June 21, 2009 - 00:16

Thanks but i am still having problems. I have uploaded the following and saved it as page.tpl but when I go to the site building Blocks I am still no seeing header in the header area. I just want to be able to easily edit the content in the header section page by page. I am showing Left sidebar, right sidebar, content & Footer but no header. Am I missing something? I have cleared the Cache. Am I supposed to do anything with any of the other files in the Theme Folder? The following is the code I got from the above post.

<?php
// $Id: page.tpl.php,v 1.7.2.9 2008/06/08 23:00:25 derjochenmeyer Exp $
?>

<?php
print $head_title
?>

<?php
print $head
?>

<?php
print $styles
?>

<?php
print $scripts
?>

@import "

<?php
print base_path() . path_to_theme();
?>
/fix-ie.css";

#header-image { background-color:

<?php
print theme_get_setting('fourseasons_basecolor')
?>
;
<?php
if(theme_get_setting('fourseasons_basecolor') != '#FF9900') print 'background-image:none;'
?>
}
h1, h2, h3, h4, h5, #headline a { color:
<?php
print theme_get_setting('fourseasons_basecolor')
?>
; }

<?php
print $head
?>

<?php
print fourseasons_adminwidget($scripts);
?>

<?php
print '<div id="headerRegion">' .$header. '</div>';
?>

<?php
     
if ($site_slogan) {
       
$site_slogan = '<div id="site-slogan">'.$site_slogan.'</div>';
      }
      else {
       
$site_slogan = '';
      }
     
      if (
$logo || $site_name) {
        print
'<a href="'. check_url($base_path) .'" title="'. $site_name .'">';
        if (
$logo) {
          print
'<img src="'. check_url($logo) .'" alt="'. $site_title .'" id="logo" />';
        }
        print
$site_name .'</a>';
        print
$site_slogan;
      } else {
        print
'<div style="clear:both; height:20px;"></div>';
      }
   
?>

<?php

   
foreach($primary_links as $key => $value ) {
      if (
ereg('active', $key)) {
       
$primary_links[$key]['attributes']['class'] = "active";
      }
    }
 
?>

<?php
if (isset($primary_links)) :
?>

<?php
print theme('links', $primary_links, array('class' => 'links primary-links'))
?>

<?php
endif;
?>

<?php

         
if (isset($secondary_links) && !empty($secondary_links)) {
            print
theme('links', $secondary_links, array('class' => 'links secondary-links'));
          }
          else {
            print
'<ul class="links secondary-links"><li style="border:none;">&nbsp;</li></ul>';
          }
       
?>

<?php
     
if (!empty($mission)) {
        print
'<div id="site-mission">'.$mission.'</div>';
      }
   
?>

<?php
if ($breadcrumb) { print $breadcrumb; } else { print '<div class="breadcrumb"><a href="#">&nbsp;</a></div>'; }
?>

<?php
if ($left):
?>

<?php
if ($search_box):
?>
<?php
print $search_box
?>
<?php
endif;
?>

<?php
print $left
?>

<?php
endif;
?>

<?php
if ($tabs): print '<div id="tabs-wrapper" class="clear-block">'; endif;
?>

<?php
if ($title): print '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>'; endif;
?>

<?php
if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul></div>'; endif;
?>

<?php
if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif;
?>

<?php
if ($show_messages && $messages): print $messages; endif;
?>

<?php
print $help;
?>

<?php
print $content
?>

<?php
print $feed_icons
?>

<?php
if ($right):
?>

<?php
if (!$left && $search_box):
?>
<?php
print $search_box
?>
<?php
endif;
?>

<?php
print $right
?>

<?php
endif;
?>

<?php
print $footer
?>

<?php
print $footer_message
?>

<?php
print $closure
?>

#11

JuJu_Kelly - June 24, 2009 - 17:47

No answer??? I have update the page.tpl to include

<?php
print '<div id="headerRegion">' .$header. '</div>';
?>

just like above, I have claer the cache but still no luck. Am I missing something.
I really need the Header regoing to show up when I go to blocks so I can put other stuuf in the header region.

Thanks in advance

 
 

Drupal is a registered trademark of Dries Buytaert.