By ArgentOfChange on
Hi Folks,
I can't seem to add regions. I've added this code into my template.php file:
function csiwireframe_regions() {
return array(
'left' => t('left sidebar'),
'right' => t('right sidebar'),
'content_top' => t('content top'),
'content' => t('content'),
'header' => t('header'),
'footer' => t('footer')
);
}
And I've specified where 'content top' should appear in page.tpl.php:
<div class="main-in">
<?php print $breadcrumb ?>
<h2><?php print $title ?></h2>
<?php if ($tabs): ?><div class="tabs"><?php print $tabs; ?></div><?php endif; ?>
<?php print $content_top ?>
<?php print $content ?>
</div><!--main-in ends-->
</div><!--main ends-->
Is there anything I'm missing?
Thanks!
Comments
=-=
what version of Drupal is in use ?
is the new region showing in the drop downs in adminsiter -> modules ?
any chance page caching could be the cause ?
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
block admin
VeryMisunderstood meant Administer > Site building > Blocks
Lullabot loves you | Be a Ninja, join the Drupal Dojo
Drupalize.Me, The best Drupal training, available all the time, anywhere!
Wow, thanks for the speedy
Wow, thanks for the speedy response :)
I upgraded my installation to the latest version right before Drupal 6.0 was released (I forget the precise number).
The new region is NOT showing up in the administer>modules drop down menus.
I disabled my cache and its still not there....
Cheers!
Err, yah I meant Administer
Err, yah I meant Administer » Site building » Blocks too :)
hmmmm....
This is interesting....
If you log in with a different browser, can you get the region to show up in whatever >> whatever >> blocks ?
If you add that region to another theme (and if that theme is the default) does it show up in the above?
~silverwing - don't know why I'm asking this, actually...
_____________________________________________
MisguidedThoughts | showcaseCMS
Thanks for the suggestion,
Thanks for the suggestion, but I tried that and it didn't work either :(
Doesn't tell us much
So, is that a RC v6 or version 5 still or even a 4x????
Shot in the dark, try changing
'content_top' => t('content top'),to
'top_content' => t('top content'),and change the variable name in page.tpl.php.
If you are using v6, your regions should be in your csiwireframe.info file
Regards
Jamie
skiFFie: home of the accessibility module
Sorry for being unspecific,
Sorry for being unspecific, but my version of Drupal is 5.x (most likely 5.7, the last version prior to 6.0 released as I had updated a week before 6.0 came out.)
I created a custom theme based on Zen. There were no mods to the template.php file apart from a bit of php that lets me display the teaser on aggregated feeds:
BTW, I tried using top_content as well, same results. :(
Cheers and thanks!
Everything looks all right
Everything you posted looks all right.
Stupid question - are you sure theme name is exactly csiwireframe? Check directory name and lower/upper case.
What happens when you delete some of the standard regions from _regions() function?
--
Lupein
Drupal themes - themeartists.com
You may have hit it on the
You may have hit it on the nail.
The folder containing my theme is called csiwireframe_.
Could the underscore be causing the problem? I thought that was part of best practice for creating custom themes?
Cheers!
I think that's it
I think that's it. Why don't you try to rename the folder to csiwireframe? As an alternative - try naming callback csiwireframe__regions().
--
Lupein
Drupal themes - themeartists.com
I've got exactly the same problem
I'm using 5.7 and have exactly the same problem.
In my template-file I have these regions defined:
In my page-template, I can't use $left and $right. What's been making it even more strange is that using $left_sidebar actually works!
TUc
That's legacy
For historic reasons, variables that output content of left, right and footer regions are called $left_sidebar, $right_sidebar and $footer_message.
Does not make much sense, but that is the way it is in Drupal 5. New Drupal 6 theme system fixed this.
--
Lupein
Drupal themes - themeartists.com
I'm having trouble with this, too
I've been using the Zen theme with several custom regions. Lately the regions haven't been showing up in the dropdown menus in the Blocks page. Although content that was previously assigned to the custom regions still displays in those regions, I'm unable to add blocks to these regions (because they aren't available anymore in the menus). The blocks table in my DB still reflects the correct regions.
I've tried completely deleting and reinstalling the theme from a backup; no luck. Modifying the template.php or page.tpl.php to add or remove additional regions has no effect. I am able to add regions to other themes.
I think this started when I used the domain access module to create new prefixed block tables for a subdomain that I'm using with a Zen subtheme. I've dropped all block tables from my DB, and imported old ones from backups, removed the subtheme, disabled the domain_theme module, with no luck.
I don't know what else would have changed. Where else should I be looking? Seems like Drupal is simply not seeing the template.php file in my Zen folder, because any changes I make to it don't appear on the site. The theme is correctly named, as is the "zen_regions" function; and like I said I'm able to add regions to other themes without a problem.
Thanks!