Closed (fixed)
Project:
Clean
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Oct 2009 at 19:38 UTC
Updated:
14 Nov 2009 at 04:28 UTC
I want to add a shoutbox and have it come above the news on the front page.
I read the guideline on regions, but I seem to be doing something wrong.
I added regions[content_top] = Content Top to the .info file, above the features. I wasn't sure if I need to add ALL the regions, though, since they're not listed.
Then I tried adding this code to the page.tpl.php file: <?php if ($content_top) echo '<div class="content_top">' . $content_top . "</div>";
I tried adding this before <div id="centre"> and it threw a syntax error, so I tried it before <?php if ($title): ?>
What am I doing wrong?
Comments
Comment #1
Nosfe commentedI think when I added my Top content Region, I had to add all original regions too:
Then I added my new region just above content like this:
<? print $content; ?>
?>
I think you hav a syntax error because you forgot : in if ($content_top) senetce should be like this:
And remember to rebuild theme registry .
Comment #2
zenrei commentedThank you.
I will give that a try.
I do appreciate your help!
Comment #3
zenrei commentedOk,
I got it to work! Thank you SO much, Nosfe for pointing me in the right direction!
This is exactly what I did.
I added all regions to the .info file (because I'm weird like that, I added them between features and stylesheets (to make it alphabetical) :):
After that, I added the following code to the page.tpl.php file:
I added the above code in between
and
I then cleared the cache... and viola! there it was! and it actually WORKED! *gasp!*
Comment #4
zenrei commentedComment #5
zenrei commented