Closed (fixed)
Project:
BlueTrip
Version:
6.x-1.0-beta2
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Reporter:
Created:
6 Apr 2009 at 15:59 UTC
Updated:
20 Apr 2009 at 18:00 UTC
Jump to comment: Most recent
Hey, Couz!
Me again with my non-coder issues :-)
I really want a banner above the header, how do I do this? I just realized the regions are not defined in the .info file as D6 themes are, so I'm really puzzled here.
Tried this in page,tpl.php:
<?php if (!empty($banner)): ?>
<div class="span-24 last">
</div>
<?php endif; ?>Didn't work... :-(
Besides, the search box isn't working either no matter I updated to beta2.
Thanks in advance!
Warm regards from sunny México!
:-)
José
Comments
Comment #1
Anonymous (not verified) commentedThe search box works fine for me... did you remember to activate it in your theme settings ?
The regions are not set in the info file because it just uses the default drupal regions. To add new regions, you have to declare the default ones and add your custom one. And remember that when you change your info file, you have to refresh your theme cache by just submitting the theme page.
Comment #2
pepemty commentedOh, Couz...
I just find out that the header is what I want... I only moved it above the logo coding in page.tpl.php et voilà.
Anyway, for general knowledge, what's the correct way to create a new region?
Regards,
José
Edit:
You answered me while I was writing this :-)
Comment #3
Anonymous (not verified) commentedCreate a new region in Drupal 6
It is done in two steps. First you need to declare the region in the .info file, and then you need to assign it in your page.tpl.php.
To declare a region in the info file, for example a "content bottom" region, add this in your info file :
The first value is the machine readable name of the region, and the second one is the human readable name, that will appear in the drop-downs on the block page.
Now that the region is declared, you have to specify where in the page the region should be. To do this, you just have to add the variable to the page, using the machine readable name you created, like this :
A good idea would be to only output the region if there is something inside it, so create a condition that check if there is something in the region before outputing it, like this :
You can even add some markup around it (but inside the condition), to theme it easily :
There you go !
Comment #4
pepemty commentedCouz (tipping my cap),
Thank you! Now I have an extra region :-)
Warmest regards!
José
Comment #5
Anonymous (not verified) commented