Hello,
In my old version of Sky 6.2 I was able to add a region to the top of the page for banner use.
Things are quite different in this new version.
template.php is missing the below. Function.
function sky_regions() {
return array(
'topbanner' => t('top banner'),
'left' => t('sidebar left'),
'right' => t('sidebar right'),
'contenttop' => t('content top'),
'contentbottom' => t('content bottom'),
'contentfooter' => t('content footer'),
'footer' => t('footer'),
);
}
How can I do add a banner on top. in 6.x.7
Thanks,
Comments
Comment #1
jacineWell, you should do a subtheme when making this sort if change, but look at the sky.info file. The regions are all in there. You can add what you want, just make sure you clear the cache after adding it. You wont see the new region until you do that.
Comment #2
mikesimmons commentedComment #3
mikesimmons commentedComment #4
mikesimmons commentedI am also not able to add regions. I know to declare the region in the .info file but once I add the region to the page.tpl.php, I get the white screen of death with no chance of clearing the cache.
When doing a subtheme of Sky, can you tell me where the page.tpl.php file goes? Should mysubtheme/page.tpl.php work?
Comment #5
mikesimmons commentedOK, so this is what I have learned: I am able to add a region by using
print $newregion;. Using the existing code in page.tpl.php as an example, I was trying to addif ($newregion): print $newregion;. When I includeif ($newregion):, in the page.tpl.php, I get the white screen of death. Doesn't theif ($newregion):provide for collapsible regions? Am I missing something, is that normal? Thanks.Comment #6
jacineSorry I didn't get a chance to respond sooner.
Regions are done in the .info file in Drupal 6, so in your subtheme copy the regions from sky.info that you want, add whatever new ones, and then you need to clear the cache. You will not see any new regions until you clear the cache so it's very important. You also need to print them in page.tpl.php like you mentioned.
Just out of curiosity, did you search Drupal docs for help here? This page has all the information you need: http://drupal.org/node/231036
Comment #7
mikesimmons commentedThank you, Jacine. I understand I must declare the region in the .info file and clear the cache, etc. It is when I test for the region (
if ($newregion):), the page breaks.Comment #8
jacineWell... Either you need to write some CSS, you have a HTML validation error in page.tpl.php, the blocks you are putting in the region have HTML validation errors, OR region needs to go somewhere else in the HTML. Basically there are lots of things to look for.
I can't really help with this level of modification/debugging - I don't have the time. It's also impossible for anyone else to help without seeing your code, so after you give it a real shot at figuring it out on your own, if you still can't do it, I suggest posting the code you are working with and maybe someone else that reads this queue will help.
Comment #9
mikesimmons commentedThank you for your time.