Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi all,
I need to create a new region just above the content region.
I have added the new region on my .info file and the below code on my page.tpl file right above the main content.
<?php if ($content_top): ?>
<div id="content-top">
<?php print $content_top; ?>
</div>
<?php endif; ?>
I can now see my new area under blocks however, when I add a new block there it isn't formatted with the standard theme layout. Instead of appearing in the centre right above the main content it's displayed on the far left behind my left sidebar pushing all the rest of the regions underneath.
I am hoping someone can help me finalise this.
Many thanks for your time
Comments
Comment #1
Alan Cooney CreditAttribution: Alan Cooney commentedHave a look at the ad_blueprint theme for a way of doing this, but it's not easy. The theme uses an undocumented but very effective layout system seen in Zen and a few other related themes.
Alan
Comment #2
iantresman CreditAttribution: iantresman commentedI was able to add a new region below the main content, which I call "mybottom":
to:
In (1) above, it was necessary to add all the existing regions, otherwise my sidebar disappeared, breaking the theme.