Ashitha
Ashitha

Reputation: 81

block in header doesn't appears in drupal

i added a block with some information through sitebuilding->block->addblock

and selected its region as header

But this block doesn't displays in header....any idea?

I am using drupal6

The code of page.tpl.php is as follows

    <div id="header">


      <div id="header_logo">

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

          <div id="secondary-menu">

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

          </div>

        <?php endif; ?>

        <?php

          // Prepare header

          $site_fields = array();

          if ($site_name) {

            $site_fields[] = check_plain($site_name);

          }

          if ($site_slogan) {

            $site_fields[] = check_plain($site_slogan);

          }

          $site_title = implode(' ', $site_fields);

          if ($site_fields) {

            $site_fields[0] = '<span>'. $site_fields[0] .'</span>';

          }

          $site_html = implode(' ', $site_fields);

          if ($logo || $site_title) {

            print '<h1><a href="'. check_url($front_page) .'" title="'. $site_title .'">';
            if ($logo) {

              print '<img src="'. check_url($logo) .'" alt="'. $site_title .'" id="logo" />';
            }
            print $site_html .'</a></h1>';

          }

        ?>

      </div>

      <div id="primary-menu">

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

          <?php print $primary_links_tree; ?>

        <?php endif; ?>

      </div>

    </div>

    <!-- end header -->

Upvotes: 0

Views: 362

Answers (1)

Coder1
Coder1

Reputation: 13321

I'm guessing header is defined in your theme .info file since you see it in the block page.

regions[header] = Header

But what I don't see is you printing the header region in the page template. If the region is named 'header', then you need to add this somewhere in your page template.

print $header;

Upvotes: 2

Related Questions