Follow-up for #1902464: Rethink layouts and how to integrate them seamlessly with Drupal and contrib modules.

Now that layouts are no longer dependent on Omega Tools for discovery and injection we now need something that tells users when certain regions are required by the layout but not defined by the theme.

Comments

vinoth.3v’s picture

+1 for removing the omega tools dependency. It is done already, Great.

Just FYI,
How I overcome region issue with my omega sub theme was, I will have all regions declared in main theme.info and layout may use only needed region in its layout.tpl.php. Even we have assigned blocks to some region from blocks admin page or through context, Layout will render only the needed regions.

I didn't see any issues with that. (may be performance issue?)

Layout incompatibility comes only when we enable a layout from another theme which is not sub theme of Omega. But, Is that the facility going to happen? I hope It is out of scope from the omege theme admin?.

Edit: Also, layout has the control over the regions only Not blocks. So displaying a block into different region based on layout is not layout's job.

fubhy’s picture

I am not 100% sure I understand all of the questions. However let me try to answer them anyways:

Even we have assigned blocks to some region from blocks admin page or through context, Layout will render only the needed regions.

We don't have performance issues with blocks of regions that are not rendered by the active layout. All regions that are not supported by a layout will not have blocks processed. So there is no issue with that... So yes, we only process the needed regions (blocks). No overhead.

Layout incompatibility comes only when we enable a layout from another theme which is not sub theme of Omega. But, Is that the facility going to happen? I hope It is out of scope from the omege theme admin?.

A layout can be enabled anytime. But if you don't declare the regioins needed by the layout in the theme.info file as well those regions will never get rendered because they won't ever have blocks in them. So that's fine too. Layouts are only discovered in sub-themes of Omega. Furthermore, you can only choose from subthemes from the theme trail of the active theme.

Edit: Also, layout has the control over the regions only Not blocks. So displaying a block into different region based on layout is not layout's job.

Layout's only provide the regions and render them. Contextually placing the blocks is not part of that job. And I am pretty sure I never said that we would do that.

To clarify: This issue is about showing a notice in the theme settings when a layout wants to use regions which are currently not provided by the theme.info file.

vinoth.3v’s picture

@fubhy
Thank you for immediate reply.

From your reply It seems I am moving to the right direction of making sub theme. I am 100% OK with the current implementation. :)