2

I've found info to add regions to a custom layout in an Omega 4 subtheme. Regions need to be declared in theme.info, layout.inc and then printed/rendered in layout.tpl.php.

I've done all that and they don't appear on the page after cache clearing.

Note:

  • They do appear in /admin/structure/block (I can add blocks to the regions there but they aren't displayed on the actual pages).

  • The regions also appear if I edit the theme.info file, and templates/system/page.tpl.php file, and disable the use of layouts in omega 4 subtheme settings.

Code i used in following files: /theme.info

regions[footercolumnone] = Footer Column one
regions[footercolumntwo] = Footer Column two
regions[footercolumnthree] = Footer Column three
regions[footercolumnfour] = Footer Column four

/layouts/owr/owr-layout.tpl.php

<div class="l-footer-column1"><?php print render($page['footercolumnone']); ?></div>
<div class="l-footer-column2"><?php print render($page['footercolumntwo']); ?></div>
<div class="l-footer-column3"><?php print render($page['footercolumnthree']); ?></div>
<div class="l-footer-column4"><?php print render($page['footercolumnfour']); ?></div>

/layouts/owr/owr.layout.inc

regions[footercolumnone] = Footer Column one
regions[footercolumntwo] = Footer Column two
regions[footercolumnthree] = Footer Column three
regions[footercolumnfour] = Footer Column four
1
  • I found that my /layouts/owr/owr.layout.inc file still said: template = simple-layout instead of template = owr-layout Changing it to the latter fixed my issue. Don't know why/where that parameter is used though.
    – skrln
    Jan 16, 2014 at 12:55

1 Answer 1

1

I found that my /layouts/owr/owr.layout.inc file still said: template = simple-layout instead of template = owr-layout Changing it to the latter fixed my issue. Don't know why/where that parameter is used though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.