Dear Zen developers.
Want suggestion I have one.
Should I make a suggestion, it is, to add four or five regions at the top of the page.
And similarly of the footer in style with Bartik themet.
I have tried and spent a lot of hours to make them responsive and to look good and work well.
Without it succeeded.
So it would be really great if they were implemented.

Comments

WillyN created an issue. See original summary.

markconroy’s picture

Issue summary: View changes

Hi WillyN,

This is quite easy to achieve (though I would have found it very difficult a few years ago). You need to do 3 things:

1) Declare your regions in your .info file
2) Print these regions in your page.tpl.php file
3) Use some CSS to position things

1) Declare your regions in your .info file

Open YOURTHEME.info,
Under where the regions are printed, add in your new regions. For example:
regions[above_content_one] = Above Content One
regions[above_content_two] = Above Content Two
regions[above_content_three] = Above Content Threee
regions[above_content_four] = Above Content Four

2) Print these in your page.tpl.php file.
Open your page.tpl.php file. Where you want these regions to appear, add code similar to this

<div class="flex quarters">
<?php if ($page['above_content_one']): ?>
      <?php print render($page['above_content_one']); ?>
<?php endif; ?>
<?php if ($page['above_content_two']): ?>
      <?php print render($page['above_content_two']); ?>
<?php endif; ?>
<?php if ($page['above_content_three']): ?>
      <?php print render($page['above_content_three']); ?>
<?php endif; ?>
<?php if ($page['above_content_four']): ?>
      <?php print render($page['above_content_four']); ?>
<?php endif; ?>
</div>

3) Add some CSS.
Open your sass file (presuming you are using sass). Add code similar to this (I am using flexbox here to lay these out).

.flex {
  display: flex;
  flex-wrap: wrap;
}

.flex {
  .region {
    flex-grow: 1;
    flex-basis: 0;
    min-width: 100%;
  }
  @media screen and (min-width: 650px)  {
    .region {
      min-width: 50%;
    }
  }
  @media screen and (min-width: 960px) {
    &.quarters .region {
      min-width: 25%;
    }
  }
}

You might need to modify the above to suit your needs, but hopefully that'll get you started.

echoz’s picture

Category: Plan » Support request
johnalbin’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.