Dear friends,

I have wasted hours trying to figure out why the html for $sidebar_right in my custom theme is missing. I have tracked down the problem to the $layout variable, which is set to the value "left". I don't understand why it should be this value; it should be set to "both" because I haven't changed it from the default. I am using the core theme "garland" for the administration pages and switch to my custom theme by clicking on "My account" in the Navigation.

If you can come up with the answer, you will be saving my sanity! Many thanks in anticipation.

My theme could hardly be simpler. It comprises a single page.tpl.php file which contains the following code:

<html>
<head>
  <title><?php print $head_title ?></title>
  <?php print $styles ?>
</head>

<body>
  <div id="container">
    <div id="header">
      <h1><?php print $site_name ?></h1>
    </div>
    
    <?php if ($sidebar_left): ?>
      <div id="sidebar-left">
        <?php print $sidebar_left ?>
      </div>
    <?php endif; ?>
    
    <div id="main">
      <h2><?php print $title ?></h2>
      <?php print $content ?>
    </div>
  
    <?php if ($sidebar_right): ?>
      <div id="sidebar-right">
        <?php print $sidebar_right ?>
      </div>
    <?php endif; ?>

    <div id="footer">
      <?php print $footer_message ?>
    </div>
  </div>
</body>
</html>

Comments

DragoonBoots’s picture

If this is Drupal 6, I'm pretty sure that the variable names should be just $left and $right. $sidebar_left and $sidebar_right were used in Drupal 5 for this purpose.