Hi Guys,

I'm trying to override the theme for the footer section of my zen subtheme, which according to everything I have read is a simple task. I have simply created a copy of block.tpl.php in my theme and named it block-footer.tpl.php but it is not having any effect on the footer region no matter how I edit the file. I have cleared all caches and the theme registry but with no success. Am I missing something trivial here?

Thanks.

Comments

komal.savla’s picture

If you want to theme the footer region, create the footer.tpl.php and copy the code for the footer section from the page.tpl.php and paste it in the footer.tpl.php.
Here is the code:

<?php if ($footer || $footer_message || $secondary_links): ?>
      <div id="footer"><div class="section">
        <?php print theme(array('links__system_secondary_menu', 'links'), $secondary_links,
          array(
            'id' => 'secondary-menu',
            'class' => 'links clearfix',
          ),
          array(
            'text' => t('Secondary menu'),
            'level' => 'h2',
            'class' => 'element-invisible',
          ));
        ?>

        <?php if ($footer_message): ?>
          <div id="footer-message"><?php print $footer_message; ?></div>
        <?php endif; ?>

        <?php print $footer; ?>

      </div></div> <!-- /.section, /#footer -->
    <?php endif; ?>

then in the page.tpl.php add this line:

 <?php include 'footer.tpl.php'; ?>

And clear the cache.
Then you can edit the footer.tpl.php the way you want.

rbriskie’s picture

You usually have to have the base template as well as the custom one.

e.g. For block-footer.tpl.php to work you need to also have block.tpl.php included in your theme directory.

scottsanders1987’s picture

I can confirm that I had the exact same problem and rbriskie's solution worked perfectly for me. Thanks! I am using Drupal 6.22.