Hi Everyone,

I know that there is something stupid that I am missing, but I've been staring at this for hours and I can't figure it out. Here is what I have in place.

I create the regions in my .info file. I have Header, Features, Left, Content, Right, and Footer. In the admin section I can see all of these regions and have assigned blocks (to some of them). The blocks that I have assigned are set to be available on all pages of my site (for the moment). I then load the homepage of the site and the only content that appears is the description for the page node.

I have the devel themer installed, and when I look at the Template Variables I am able to see the different regions, and the content inside of them -- so I know I am not trying to print an empty variable.

Does anyone have any thoughts?

A.

Comments

timpiche’s picture

For every region you add in the .info file, you also need to add that region into the page.tpl.php file for the theme. If you created a region called "header" in the info file, you would need to add the following code into the page.tpl.php where you want it to show up:

<?php if ($header): ?>
<div id="YOUR_CSS_ID" class="YOUR_CSS_CLASS">
<?php print $header; ?>
</div>
<?php endif; ?>
jardineworks’s picture

Hi Tim,

Thanks for your reply. I have done the if checks and put in divs for each of the regions. Tried clearing the cache, tried shutting down the web server, tried restarting my computer... nothing seems to work.

any other ideas.

A.

timpiche’s picture

Can you copy your info file and your page.tpl.php file so I can see it?

jardineworks’s picture

.info file
--------

name = GGB
description = Get Growing for Business theme
core = 6.x
engine = phptemplate
base theme = zen

regions['header'] = header
regions['feature'] = features
regions['left'] = left
regions['content'] = content
regions['right'] = right
regions['footer] = footer
stylesheets[all][] = css/style.css
stylesheets[all][] = css/jqueryslider.css
stylesheets[all][] = css/facebook-button.css
scripts[] = scripts/jquery-1.4.2.min.js
scripts[] = scripts/jquery.corner.js
scripts[] = scripts/customscripts.js
scripts[] = scripts/jqueryslider.js
scripts[] = scripts/jquery.pngFix.pack.js
scripts[] = scripts/jquery.pngFix.pluginpage.js
scripts[] = http://static.ak.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.js

page.tpl.php
-------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="<?php print $language->language; ?> "lang="<?php print $language->language; ?>" dir="<?php print $language->dir; ?>">
<head>
  <title><?php print $head_title; ?></title>
  <?php print $head; ?>
  <?php print $styles; ?>
  <?php print $scripts; ?>
  
  	<!--[if IE 6]>
	<link href="css/ie6.css" type="text/css" rel="stylesheet" />
	<![endif]-->

	<script type="text/javascript"> 
	    $(document).ready(function(){ 
	        $(document).pngFix(); 
	    }); 
	</script>  
</head>
<body class="GenericPage <?php print $body_classes; ?>">

  <div id="page">
  

	<div id="header" class="region region-header">
		<div id="logo-title">&nbsp;</div>
		<div id="header-blocks">
		  
		  <?php print $header; ?>
		  $items[0]['value'];
		  <div id="topNav">      
			  <?php if ($primary_links) : ?>            
				  <?php print theme('links', $primary_links); ?>         
			  <?php endif; ?>
		  </div>

		  </div><!-- /#header-blocks -->
	</div><!-- /#header -->


    <div id="main" class="region region-feature">
		<div id="topMain">&nbsp;</div>
		<div id="HomeStories">
		  <div class="wrap">
			<div id="slide-holder">
			  <div id="slide-runner"> <a href=""><img id="slide-img-1" src="<?php print path_to_theme(); ?>/img/Home_Stories1.jpg" class="slide" width="880" height="230"/></a> <a href=""><img id="slide-img-2" src="img/Home_Stories1.jpg" class="slide" width="880" height="230"/></a> <a href=""><img id="slide-img-3" src="img/Home_Stories1.jpg" class="slide" width="880" height="230"/></a>
				<div id="slide-controls">
				  <p id="slide-nav"></p>
				</div>
			  </div>
			</div>
		 </div><!-- /#class=wrap -->
		</div><!-- /#HomeStories -->


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

        <div class="IntroBlock">
		    <span class="blackBlock"></span>
			<?php print $content; ?>
        </div>
		<img class="BlogTitle" alt="Get Growing For Business" src="<?php print path_to_theme(); ?>/img/title_get_growing_for_business.jpg"/>

		<hr/>
		
		<div class="clrflt">&nbsp;</div>		
      </div> <!-- /#content -->

		<?php if ($right) : ?>
			<div id="right" class="region region-right">
			  <?php print $right; ?>
			</div> <!-- /#sidebar-right-inner, /#sidebar-right -->
		<?php endif; ?>
     
	  


    </div> <!-- /#main -->

    <?php if ($footer) : ?>
      <div id="footer" class="region region-footer">
        <?php print $footer; ?>
      </div> <!-- /#footer -->
    <?php endif; ?>

  </div> <!-- /#page -->


  <?php print $closure; ?>

</body>
</html>
timpiche’s picture

Change the following in your info file and you should be okay!

Bad

regions['header'] = header
regions['feature'] = features
regions['left'] = left
regions['content'] = content
regions['right'] = right
regions['footer] = footer

Good

regions[header] = header
regions[feature] = features
regions[left] = left
regions[content] = content
regions[right] = right
regions[footer] = footer
jardineworks’s picture

Kill me.

Hahaha -- the horrible quote monster strikes again. That did make the items show up so thank you tremendously for the help. Just one thing to note, which I am not sure if it is something I should worry about. I am now seeing messages that states..

* The block Admin was assigned to the invalid region 'right' and has been disabled.
* The block Development was assigned to the invalid region 'right' and has been disabled.
* The block Primary links was assigned to the invalid region 'header' and has been disabled.
* The block Navigation was assigned to the invalid region 'right' and has been disabled.
* The block Devel Node Access was assigned to the invalid region 'footer and has been disabled.
* The block blog_all_posts: Block was assigned to the invalid region 'content' and has been disabled.

Everything is still showing though. Is that normal? (sorry -- newbie on the loose here)

A.

timpiche’s picture

Disable all blocks in your custom regions and flush all caches. Then you can re-enable the blocks in to those regions again.

Good luck with the site and the Drupal experience!

yuriy.babenko’s picture

Also make sure you are outputting the regions you have defined in your page.tpl.php. For example, I see you have a region called 'feature', but it is not being output. Add echo $feature; in your page.tpl.php.

---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com