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

Alan Cooney’s picture

Assigned: Unassigned » Alan Cooney

Have 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

iantresman’s picture

I was able to add a new region below the main content, which I call "mybottom":

  1. Into the theme file ad_novus.info, add after the line: stylesheets[all][] = style.css:
    regions[left] = Left sidebar
    regions[right] = Right sidebar
    regions[content] = Content
    regions[header] = Header
    regions[footer] = Footer
    regions[mybottom] = Bottom
  2. Into the file page.tpl.php, change:
    <?php print $feed_icons; ?>
          </div>
         </div></div></div>

    to:

     <?php print $feed_icons; ?>
          </div>
        </div>
    
    <?php if ($mybottom): ?>
      <div id="mybottom">
        <?php print $mybottom ?>
      </div>
    <?php endif; ?>
    
    </div></div>
  3. Go to Admin|Performance and Clear cache
  4. Go to block, and the new region should be visible at the bottom of the main contents.

In (1) above, it was necessary to add all the existing regions, otherwise my sidebar disappeared, breaking the theme.