How to add a block for topbanner?
How can one add a block to replace or override the topbanner area?
I understand that themes can place images in topbanner, but I'm wondering if I can replace or override that default with, say... and ad block. I mean, that topbanner space is only the most valuable item on any website.
Robert
I edited ~/sites/default/themes/tma_custom/page.tpl.php & ~/sites/default/themes/tma_custom/tma_custom.info to get a block defined for the "topbanner" area.
However, the /header images hierarchy of the enabled themes apparently still fills out that area on all pages for which topbanner elements are defined. That's to be expected, I suppose, since those directives are still there. I guess that if I put anything in that block it would appear either in front of or behind the header image.
Do I need to go through the themes that are enabled and comment out the topbanner header image definitions? Would that work? It seems so hackish. Or is there some way to override these in the subtheme?
Robert
I think you are now referring to CSS declarations which are placing background images in the topbanner area for certain pages.
You can override these declarations, and turn off the background image by using background: none or some other similar CSS declaration.
That works to clear the topbanner background. I've got a block defined there, so this wish is resolved, I believe.
Thanks!
Here is what I have in the ~/sites/default/themes/tma_custom/tma_custom.info file:
; Regions
...
regions[topbanner] = topbanner
And in the ~/sites/default/themes/tma_custom/page.tpl.php file:
<code>
<div id="topbanner" class="region region-topbanner">
<?php print $topbanner; ?>
<?php if ($breadcrumb): ?>
<?php print $breadcrumb; ?>
<?php endif; ?>
</div> <!-- /#topbanner -->
</code>
I added the class to the first line, and added the next "print" line after that. That created the topbanner block. It shows up highlighted yellow in the admin list blocks display.
Then I created another banner ad in openx and entered its invocation code in the openx plugin module. I moved the banner item into the topbanner block and saved the list, then cleared the theme registry and cache.
But the banner doesn't display. Actually, I tried two banners - the first 965x60px using a background header, and the second one smaller, 600x65px. The invocation code is in the page source, but the banner doesn't display.
Could that "breadcrumb" code be interfering with the banner image display in the this new topbanner block?
Robert
Thought I was wrong, but was mistaken. Ads in the topbanner area do work now. OpenX is a little confusing.
So the code I posted above (plus overriding the topbanner background in the CSS) shows how to do this.
Robert
That's to be expected, I suppose, since those directives are still there. I guess that if I put anything in that block it would appear either in front of or behind the header image.
Thanks
______

Hi,
Sorry, but the default theme doesn't provide a block region where the topbanner image is. I'll move this to the wishlists forum since it's worth considering adding for the future.
(If you know how to do Drupal themeing, you could modify the theme yourself, but that's probably beyond the scope of this discussion)