I wanted to create a base layout to provide default layout sitewide and variations of base layout to inherit regions, CSS and JS files from base layouts (Just like sub themes)

wait. I am submitting the patch. I am not sure whether the code is added to the right place. But it works for me, for now, it uses only the regions, CSS and JS declarations from base layout,

in sub layout.inc we have to specify the base layout name

; file sub.inc

name = sub
description = sub layout

; base or parent layout
base layout = base

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vinoth.3v’s picture

Adding my first patch to omega.

vinoth.3v’s picture

Status: Active » Patch (to be ported)
fubhy’s picture

Status: Patch (to be ported) » Needs review
dasjo’s picture

vinoth.3v: check your editor to comply with drupal coding standards. you can review patches using Dreditor which indicates that your patch adds white spaces for empty lines which shouldn't be the case

vinoth.3v’s picture

@dasjo
Thank you for advice, I am using Geany on ubuntu. It is fixed :)

adding another patch.

vinoth.3v’s picture

Sorry previous one was wrong,

dasjo’s picture

that's much better vinoth.3v :) sorry about being picky but dreditor still shows some (trailing) white-spaces

dddbbb’s picture

Has this idea stalled or is anyone else still interested?

I personally think it's a great idea. I was working with multiple layouts just today and was wondering if there was a better way than repeating my code so much in each layout; "Sub layouts" seems like a great solution to this potentially.

Has a version of this concept already snuck into dev without me noticing by any chance?

msmithcti’s picture

Assigned: vinoth.3v » Unassigned
Status: Needs review » Needs work

Thanks for the patch! This is certainly something that is interesting and worth consideration. Looks like the patch is pretty out of date and needs a re-roll. As mentioned above there is also some whitespace issues too.

fubhy’s picture

I still think this is an interesting addition for our layouts. Do you want to re-roll the patch? Some parts of this patch still need to be optimized but in general the idea of base layouts makes sense.

vinoth.3v’s picture

Status: Needs work » Postponed

The patch has not considered many aspects of the Omega layout system since it was written in early days of Omega 4.x. When I writing that patch, I just wanted to add base layout Css & Js files to sub layouts. So patch was created that way. But with Omega later updates, now it is possible to include base layout Css & Js in sub layout.inc files in path directly, so I am not using the patch right now.

Yes, it is worth If Omega have such a Optional feature. but the patch is not enough. Better you can put your time on other part of the Omega.
Lets see if any one need this feature.

fubhy’s picture

Status: Postponed » Active

Yes, what you said here is true, one can re-use css/js across layouts... but base layouts would do that automatically - that's the actual benefit. So I think we really should implement this. It's not too hard to write that code anyway...

vinoth.3v’s picture

That's Great!

fubhy’s picture

Tagging

fubhy’s picture

Issue summary: View changes

edit

HeathN’s picture

I am confused. Does Omega 4 allow for base/sub layouts? I need this as a bunch of my pages are needing altered HTML but also need the same header and footers.

fubhy’s picture

Issue summary: View changes
Issue tags: -Omega 4.x release blocker

No, I never wrote the code to implement that... You can of course copy a layout multiple times and re-use parts of it, but there is no inheritance.