I have a custom theme I'm making with several custom regions defined in the .info file like so:

regions[home_leftfeature] = Home - Left Feature
regions[home_rightfeature] = Home - Right Feature
regions[home_leftcolumn] = Home - Left Column
regions[home_rightcolumn] = Home - Right Column
regions[leftnav] = Left Navigation
regions[breadcrumbs] = Breadcrumbs
regions[inside_maincontent] = Inside Page - Main Content
regions[inside_rightcolumn] = Inside Page - Right Column
regions[inside_bottomnav] = Bottom Page to Page Navigation

The regions show up correctly in the Drupal admin and I can assign blocks to them. However, no matter what block I assign to which regions, I can't get the block to display on my page. I've tried (and yes, these are all in PHP tags):

 print $inside_rightcolumn

and nothing comes out on the page. Just a blank space. And I've also done a:

print_r(get_defined_vars());

and the variables for the regions show up but they're blank. This code is in my page.tpl.php file. I've cleared my cache several times. Even if I put one of the "default" blocks in my custom region, nothing prints out on the page where the region is supposed to be.

Any suggestions would be great!

Comments

gausarts’s picture

If you can provide a link, it may be easier to spot the problem.

love, light n laughter

toddbbi’s picture

http://staging.brooks-bell.com/about

Here is the page where I've printed out all the available variables in the spot where I want my region blocks to show up. This is where I saw the empty region variables in this big array.

And here's the block of code in my page.tpl.php file where I printed that out:

		 <div id="col3">
			<pre>
			<?php 
				print_r(get_defined_vars());
				//print $inside_rightcolumn;			
			?>
            </pre>            
        
        </div>

I have the code for printing out just that region commented out right now, but when I uncomment it, the DIV just appears blank with no content.

gausarts’s picture

Ah, why not give it a real block content first? There can be some css that causes the problem. And it'll be easier when it is filled, even though empty. Now I can't spot any trouble without the block enabled:)

love, light n laughter

toddbbi’s picture

OK, check that link again. I removed the printed out variable and pasted in the content of the block I'm TRYING to get to appear in there. It comes up fine (never mind the broken image, etc).

I guess I'm not quite sure what you mean by "give it a real block content". In my Drupal admin, I have the block "Featured Employee" (which is the block you see on the page now) assigned to the inside_rightcolumn region. I'm just confused as why when I have a block assigned to the region and then print out that regions, nothing shows up.

gausarts’s picture

From the variables you print out previously, I found
[is_admin] =>
[is_front] =>
[logged_in] =>

with no value. Could be some permission and block visibility problem.

love, light n laughter

gausarts’s picture

Oops, sorry. I give up.

love, light n laughter

glass.dimly’s picture

This has not happened to me before, I've been theming in Drupal for years now.

But it keeps happening on one of my sites. I'll post back when I have a solution to this problem. I know for sure that I'm correctly declaring my variables in .info and printing them on page.tpl.php.

Weeeiiird.

glass.dimly’s picture

Done some more research on this issue + workaround. Follow up here in the bug report I created: http://drupal.org/node/1233610