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 ;)
Comment | File | Size | Author |
---|---|---|---|
mockup.jpg | 75.18 KB | Vially |
Comments
Comment #1
jamesmcd CreditAttribution: jamesmcd commentedVially
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
Comment #2
NorthPort CreditAttribution: NorthPort commentedThanks, I have been wondering how to do this as well!
Comment #3
dailypress CreditAttribution: dailypress commentedim using Marinelli for Theme and Drupal 6.
how come my marinelli.info code does not have regions in it and looks like
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!
Comment #4
dailypress CreditAttribution: dailypress commentednever 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! :)
Comment #5
jamesmcd CreditAttribution: jamesmcd commented