Hi - I am loving the possibilities of Omega 4 it looks very good although the learning curve I am finding to be very steep what with the current lack of documentation.

Anyway I am hoping someone could advise me on the best way to add new regions? I want a region called 'admin sidebar' to go outside of the rest of the page?

Thanks in advance

#2 added-region.png8.66 KBleovw


airsosa’s picture

If you could do a little more explanation I believe I could be of help. If possible a sketch of what you hope to achieve, like the position of your admin sidebar wrt to the rest of the page

leovw’s picture

8.66 KB

Hi thanks for your help

Attached is the position of the sidebar - I have tried to add it to a custom layout but it currently isn't being rendered?

samwillc’s picture

simple.layout.inc has the following:

name = Simple
description = A simple 3 column layout demonstrating mobile first and Susy.
preview = preview.png
template = simple-layout

; Regions
regions[header]         = Header
regions[navigation]     = Navigation bar
regions[highlighted]    = Highlighted
regions[help]           = Help
regions[content]        = Content
regions[sidebar_first]  = First sidebar
regions[sidebar_second] = Second sidebar
regions[footer]         = Footer
regions[admin_bar] = NEW AREA which is an admin bar

; Stylesheets
stylesheets[all][] = css/layouts/simple/simple.layout.css

and an accompanying 'simple-layout.tpl.php'

Can you not add a region to 'simple.layout.inc' and then also add it to the html in 'simple-layout.tpl.php'?

Like so:

<div class="admin-sidebar">
<?php print render($page['admin_bar']); ?>

I thought that's all you needed to do (adjust the filenames etc. for your actual layout). Although, I am not sure now what the point is for a 'mytheme.info' file if regions are defined in this layout folder instead.

Maybe you've already tried this but you didn't include any code you've attempted. Some instructions would be most welcome for this theme though that's for sure!

fubhy’s picture

You have to define the region in the mytheme.info file too

samwillc’s picture

You have to define the region in the mytheme.info file too

Another piece of the puzzle! Thanks.

fubhy’s picture

Take a look at what Ohm does in the ohm-hero layout.

samwillc’s picture

Have done, thanks for the pointer.

fubhy’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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