How can i add more regions to this?

i see nothing in the *.info.......which must mean standard 3 regions left/right/content?

Comments

jthorson’s picture

I had the same question ... all I did was add the regions into the *.info file, and modified page.tpl.php.

Inside marinelli.info, I added:

regions[left] = Left sidebar
regions[right] = Right sidebar
regions[content] = Content
regions[footer] = Footer
regions[abovecontent] = Above Content

and inside page.tpl.php:

  <?php if ($abovecontent): ?>
    <div id="abovecontent" class="region">
     <?php print $abovecontent; ?>
    </div>
  <?php endif; ?>

Seems to have worked ... I'm playing around with the css now to try and skin things appropriately.

expatme’s picture

thanks a lot

Durran’s picture

I have been fooling with this as well.. I have added two content areas "above" the main page content center, and a full sized content area (970px) under the secondary links, and one below content (970px).

I am terrible at css.. I have a good question here. Maybe a few of us could get this working!

I am trying to "class" or add two areas above the main page content that area side by side, and not stacked. I have tried and failed.
I am taking an educated guess that it is held within the div class or id area.

so looking at this example:

<?php if ($abovecontent): ?>
    <div id="abovecontent" class="region">
     <?php print $abovecontent; ?>
    </div>
  <?php endif; ?>

Does the "div id" take priority over the "div class" ?
And if a person can use either one (which I believe is correct, one OR the other), which one would be better. Also, which css file would this modification be added to?
It would seem that the two areas would need to be (in total width) 485 pixels each.
so how would a person (css "know how" guy) code this in the stylesheet?

I think this would be great for this awesome theme..

Thoughts anyone, or tips!!!

Durran’s picture

Title: How to add more regions? » More regions? css mods.

This would be applicable to almost all recent versions of Marinelli 6.x
I have been fooling with this as well.. I have added two content areas "above" the main page content center, and a full sized content area (970px) under the secondary links, and one below content (970px).

I am terrible at css.. I have a good question here. Maybe a few of us could get this working!

I am trying to "class" or add two areas above the main page content that area side by side, and not stacked. I have tried and failed.
I am taking an educated guess that it is held within the div class or id area.

so looking at this example:

<?php if ($abovecontent): ?>
    <div id="abovecontent" class="region">
     <?php print $abovecontent; ?>
    </div>
  <?php endif; ?>

Does the "div id" take priority over the "div class" ?
And if a person can use either one (which I believe is correct, one OR the other), which one would be better. Also, which css file would this modification be added to?
It would seem that the two areas would need to be (in total width) 485 pixels each.
so how would a person (css "know how" guy) code this in the stylesheet?

I think this would be great for this awesome theme..

Thoughts anyone, or tips!!!

expatme’s picture

div id = UNIQUE !! per page

class you can have as many instances on the page as you like.

drupal themes use the id from the nodeid

Durran’s picture

Ahh, I think I understand, Ive been grasping the whole css "realm" as of lately.. (and slowly!)

Would you know as for the "twin-area" ? And how a guy might code this in css?

ishmael-sanchez’s picture

I agree I like having more than just the default regions to work with. Here is my implementation with a custom sub theme

info file:

name = Sub Theme Name
description = Custom sub theme of Marinelli
core = 6.x
engine = phptemplate

stylesheets[all][] = custom.css
base theme = marinelli

regions[header] = Header
regions[content_top] = Content Top
regions[content] = Content
regions[content_bottom] = Content Bottom
regions[left] = Left
regions[right] = Right
regions[footer] = Footer

page.tpl.php:

 <?php if ($content_top): ?>
    <div id="content-top">
      <?php print $content_top; ?>
    </div>
  <?php endif; ?>
 <?php print $content ?>
 <?php if ($content_bottom): ?>
    <div id="content-bottom">
      <?php print $content_bottom; ?>
    </div>
 <?php endif; ?>
ishmael-sanchez’s picture

Like mentioned here ID's are unique per page and classes can appear more than once. Most module use classes so to override you might have to adjust the CSS specificity, check out http://www.ishmaelsanchez.com/css-specificity (Shameless plug). For two side by side blocks just add two blocks to the abovecontent region and float the top most block left and the other right. Use a width of 450px (Since most likely you will want space between the blocks, padding or margin) and try to keep them the same height so they look sharp. And you will need to add a rule like clear:both to the content below those two blocks to prevent the floated content from 'coming' down and messing up the layout.

Compel’s picture

I'm curious how to get two blocks side by side in the slide down region in Marinelli.

Ela’s picture

#1 works for me, Thanks!

oadaeh’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

This issue is being closed because it is against a branch for a version of Drupal that is no longer supported.
If you feel that this issue is still valid, feel free to re-open and update it (and any possible patch) to work with the 7.x-4.x branch.
Thank you.