Closed (fixed)
Project:
Omega
Version:
7.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Feb 2013 at 22:50 UTC
Updated:
4 Jan 2014 at 02:58 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
fubhy commentedOkay... This works!!!! Awesome :). It's going to be even more awesome than I initially thought it would be. Yai!
Comment #2
fubhy commentedOkay.. So we will use a feature of ctools plugin API called 'child plugins'.
This way we can define multiple layouts through one hook and get the ball rolling. Due to the theme functions we can then even go further and load the CSS accordingly on front-end/admin pages without having to change our info structure much. So omega layouts, the way they are currently, can be 100% translated into panels layouts (and its happens seamlessly!).
I think I'll have a patch/commit ready this afternoon.
One thing that I wonder about: What should we do about $tabs, $title, etc.? Do we want to keep rendering it through the layout directly or leave that job to panels? I really would like to leave that job to panels to be honest but then we need empty array items for those things and inject them through a preprocess function so we don't get PHP notices when trying to render things that don't exist.
Comment #3
fubhy commentedI guess we can allow people to define whether they want to have those elements rendered through a settings form that we can display on the layout UI in panels. The plugin API seems to allow for these type of parent layout plugins to define form callbacks and all that stuff. Okay... So, depending on whether or not we can store that configuration per use-case and not globally for the layout I guess we would do it that way then and give the user a choice. The rendering of those page elements would then happen the original Drupal way through a process function.
Comment #4
msmithcti commentedSome Omega layouts don't really make sense to be panels layout as well, for instance layout with off canvas navigation. We should add a flag in the layout.inc file to turn off panels integration for that layout.
In answer to What should we do about $tabs, $title, etc.?:
I think #3 is the perfect solution! My usual use case is to only use panels for the main content area, however there are (rare) situations where I turn off all blocks (an option in panels) and use panels for the whole layout.
Looking forward to seeing this patch! :)
Comment #5
fubhy commentedWell, think about Panels Everywhere! In that case an off canvas navigation would make sense actually :). But I still think that the option to NOT have your layout forwarded to panels makes sense, so yeah... we will add that!
Comment #6
fubhy commentedOkay... Initial patch for this has been committed to the sandbox. It's not 100% finished yet but the integration of the layouts with panels works. We now need a solution to coupe with the missing 'page' preprocess/process hooks in case of the layout being rendered through panels (and the therefore missing $tabs, $messages, etc. variables that might be used in layouts.
Comment #8
fubhy commentedReponeing this because I removed the code for it due to some bugs that I didn't want to drag into the beta. We need a better way of handling this. I think I already have a plan.
Comment #9
dddbbb commentedIs this still on the agenda for Omega 4?
I'm currently working on an Omega 4 subtheme for a site that uses a fair bit of Panels and am wondering about how much overlap I might end up with when developing custom layouts for Panels.
Assuming I'm not using Panels Everywhere (which I'm not), what would happen to Omega 4 layouts that contain regions that would normally sit outside of a Panels layout (such as header, footer etc)? The suggestion of a flag in comment #4 makes sense to me but I'm still getting my head around how all of this will work together.
Exciting stuff though!
Comment #10
dasjoif you aren't using panels everywhere, the panels layouts normally just live within the content region.
what you can do in addition is using the panels setting to "Disable Drupal blocks/regions".
Comment #11
fubhy commentedYep. What we are planning to do with Omega 4.x layouts is to expose them as Panels layouts. However, those would normally be layouts for use with Panels Everywhere. So if you don't use Panels Everywhere there is no overlap.
Comment #12
dddbbb commentedOK, thanks for clearing that up. I'll get back to my custom Panels layouts then...
Comment #13
charlie charles commentedCan you help please?
I installed Omega 4
and I can not find the simple
or any of the omega layouts in Panels
Do you know why this is please?
Comment #14
fubhy commentedYes, because this issue is not fixed yet.
Comment #15
vinoth.3v commentedOmega layouts are Full page layouts. But in panels we only need just content area(partial) layouts (without header/footers). So we may need a way to declare regions that are available for panels (may be in layout.inc files)?
So it may be possible to hide other regions for panels. Just an Idea.
anyhow panels everywhere needs all regions.
Comment #16
fubhy commentedThis is about page layouts. nothing else. We are not going to provide responsive content layouts as it's simply not possible to do so as it's unpredictable and depends entirely on where you stick your content panes. So, as there is no such thing as "element queries" we can't reliably build responsive content panes that would make any sense. The layouts we are going to provide in Omega will only ever be meant to be used as panels everywhere layouts.
Comment #17
dasjoi have seen some polyfill workarounds to make element queries but that might be an entirely different discussion :)
edit: https://github.com/tysonmatanich/elementQuery
Comment #18
fubhy commentedYeah, but even if they work or ever will work, we are not going to introduce polyfill-dependent layouts here ;).
Comment #19
fubhy commented@Hydra just sent me https://github.com/Hydraner/nether which includes a further improved version of my original code for this. I will continue working from there and have this ready before DrupalCon.
Comment #20
charlie charles commentedGreat work fubhy - Well done! :)
Comment #21
fubhy commentedPlease try this out... Note: The layout preview icons are super larger. This is a bug with the images... We will fix that later. I don't have a image program ;).
Comment #22
fubhy commentedWhoops, I broke the omega layouts part of it... Works again now.
Comment #23
fubhy commentedAnother patch.. This one does not render any of the core page elements when rendered through panels. That's probably the better way of approaching this...
Comment #24
fubhy commentedTagging
Comment #25
fubhy commentedI had Matt test this... Now, on to the follow-up issues:
Comment #26
fubhy commentedCommitted. This is now in RC1
Comment #27
drupov commentedHi,
sorry, to reopen, but I just tried that implementation out and there's a problem I found.
Panels recognizes the layout provided by omega (panels_layout_settings.png) but even if I assign different elements to different regions through the panels interface (panels_content_settings.png) thay all get rendered in the content region (article_page.png).
Am I missing something?
Thanks!
Comment #28
fubhy commentedThese layouts here are ment to be used with Panels Everywhere. They are not content layouts, they are page layouts. Yes, you CAN use them in the content because Panels API works that way but it's not meant for that, so don't ;).
Also, I see that you are not using 4.x-dev but 4.x-RC1. Please always test with 4.x-dev as we are moving things forward towards the release.
This issue is fixed. If you find a problem in 4.x-dev please open a new issue.