Hello guys.

I was browsing around my website the other day, and noticed that I am not using the center block region at all, even if I could have some uses for it. The reason behind this is that it comes after the nodes, and not before them, and I'd like the contrary.

I have tried and moved $content higher, read around here http://drupal.org/node/171224 but haven't had that much luck, besides managing to screw my page.tpl.php and duplicate everything on the page.

What would be the right way to move content region above the nodes and have a block region above all nodes ? I have attached a photoshopped image of what I mean, just in case I'm not too coherent ;)

CommentFileSizeAuthor
mockup.jpg75.18 KBVially
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jamesmcd’s picture

Vially

This can easily be achieved by going to the fourseasons.info file and adding a new block region. This should be done the same way the standard blocks regions have been placed, in this format:

engine = phptemplate
regions[left] = Left sidebar
regions[right] = Right sidebar
regions[above_content] = Above Content
regions[content] = Content
regions[footer] = Footer

save this.

*Now clear your cache*

Next, open your page.tpl.php and search for <?php print $content ?>

Above that line enter the following: <?php print $above_content ?>

save this.

Content can now be added to and displayed in the new 'Above Content' region on your blocks page

Once saved, it should now appear above the node as desired

J

NorthPort’s picture

Thanks, I have been wondering how to do this as well!

dailypress’s picture

im using Marinelli for Theme and Drupal 6.

how come my marinelli.info code does not have regions in it and looks like

; $Id: marinelli.info,v 1.3 2008/09/18 21:28:29 lioz Exp $

name = Marinelli

description = A fresh 3-column layout for Drupal. Still usable over 4000m!

version = VERSION

core = 6.x

engine = phptemplate

stylesheets[all][] = layout.css
stylesheets[all][] = graphics.css
stylesheets[all][] = typography.css
stylesheets[all][] = links.css




; Information added by drupal.org packaging script on 2008-04-04
version = "6.x-1.7"
core = "6.x"
project = "marinelli"
datestamp = "1207295410"


; Information added by drupal.org packaging script on 2009-08-25
version = "6.x-2.96"
core = "6.x"
project = "marinelli"
datestamp = "1251185475"

when I refresh and clear cache it still doesnt show up on my Blocks.
btw I included the one line: regions[above_content] = Above Content in the code.

So I read the following that:

If none (no regions) are defined, the following values are assumed.

regions[left] = Left sidebar
regions[right] = Right sidebar
regions[content] = Content
regions[header] = Header
regions[footer] = Footer

so do I only add the one line of New Region and if so where? or does it not matter as long as its in the .info file?

I tried and cleared cache but no new region even shows up in the Admin Block section!

dailypress’s picture

never mind. I used a derivative of Marinelli called Giordani!

so I needed to change the .info file and page.tpl.php in that subfolder. issue fixed! :)

jamesmcd’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)
Issue tags: -blocks, -region, -region visibility, -block regions

Automatically closed -- issue fixed for 2 weeks with no activity.