I have a small problem with the header on the front page. I created a page at: "http://www.okstudio.com.au/home" and I promoted that page to the front page. So I assumed that when I access "http://www.okstudio.com.au" the page will look exactly same as "http://www.okstudio.com.au/home". How ever the front page is missing the header.
Drupal is not generating <div id="content-header"> when the content is promoted to the front page. Is there a php file somewhere that I can edit to fix this problem?

Comments

gosvald’s picture

I forgot to mention that I am using a zen subtheme. It is probably Zen that does not generate the header when a page is promoted to front page.

akalata’s picture

Status: Active » Fixed

The "promoted to front page" is intended to result in a list of multiple nodes displaying in a less-than-complete view. If you want to have *only* that node "become" the front page of your site, that can be set at Admin -> Site Configuration -> Site Information ->Default front page (admin/settings/site-information). However, if you want multiple nodes to have all of that header information and be displayed on the front page, here's how you do it:

Items that are promoted to the front page are displayed as a "teaser" view, rather than a "full node" view. You'll want to adjust this code in your node.tpl.php, which controls what prints for each node when the node is NOT in a full-page display:

<?php if (!$page): ?>
    <h2 class="title">
      <a href="<?php print $node_url; ?>" title="<?php print $title ?>"><?php print $title; ?></a>
    </h2>
  <?php endif; ?>

and incorporate desired items from #content-header from page.tpl.php:

<?php if ($breadcrumb || $title || $tabs || $help || $messages): ?>
          <div id="content-header">
            <?php print $breadcrumb; ?>
            <?php if ($title): ?>
              <h1 class="title"><?php print $title; ?></h1>
            <?php endif; ?>
            <?php print $messages; ?>
            <?php if ($tabs): ?>
              <div class="tabs"><?php print $tabs; ?></div>
            <?php endif; ?>
            <?php print $help; ?>
          </div> <!-- /#content-header -->
        <?php endif; ?>

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.