I'm creating an Omega sub theme & three regions ("Sidebar 1", "Content" & "Sidebar 2") inside of the "Content zone". "Sidebar 1" & "Content" are both set to always show, "Sidebar 2" however is set to only show if there's content inside of it.
I also have a field which contains links related to the page, this is output programmatically into all three regions but CSS hides all but one. This is done so it can be shown in the "Sidebar 1" region which stacks above the "Content" region on small screens but on larger screens it'll be hidden in the "Sidebar 1" region & shown in the "Sidebar 2" region instead, on the right hand side. If "Sidebar 2" doesn't exist it'll then be shown in "Content."
"Sidebar 1" pretty much only contains a menu, only on some pages though, which is again programmatically output. The reason being that I want to label / title of the menu to be set to the name of the currently active page and it was the best way I could see of doing it.
I've almost got it all working as I have a class set on the content zone div which states how many regions are inside of it (2 means no "Sidebar 2", 3 means it's there) & the first sidebar now adds a class stating if it's empty or not.
I've attempted to add a class to the "Sidebar 2" region by using drupal_get_region_content("sidebar_1") to detect if the "Sidebar 1" region is empty of not and add a class to the "Sidebar 2" region based on this will CSS selectors will use. Problem is no mater what I try or what region I try to output drupal_get_region_content always returns NULL.
The basics of what I'm trying to do I'll try and write here what I'm wanting in a more concise manor, above I've also included how I'm trying to do it.
I have some pages with three regions in the content zone, I want to output a field in all three regions so they can be shown & hidden at different screen sizes with CSS.
The left sidebar might have a menu in which is added programatically. If it does not have this then the second sidebar doesn't need to the field I'm outputting programmatically will just be shown in the first sidebar & main content area.
I realise this is very long, appreciate anyone who's read it and any help you can offer.